#nginx1.14 centos7
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
worker_connections 2048;
}

http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$http_host" ';

log_format json '{"@timestamp":"$time_iso8601",'
'"clientip":"$http_x_forwarded_for",'
'"remote_user":"$remote_user",'
'"request":"$request",'
'"method":"$request_method",'
'"status":"$status",'
'"code":"$status",'
'"size":"$body_bytes_sent",'
'"referer":"$http_referer",'
'"agent":"$http_user_agent",'
'"host":"$http_host",'
'"remote_addr":"$remote_addr",'
'"responsetime":"$request_time",'
'"upstreamtime":"$upstream_response_time",'
'"url":"$uri",'
'"request_filename":"$request_filename",'
'"index":"$fastcgi_script_name"}';

access_log /var/log/nginx/access.log json;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;

include /etc/nginx/mime.types;
default_type application/octet-stream;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location / {
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}

# Settings for a TLS enabled server.
#
# server {
# listen 443 ssl http2 default_server;
# listen [::]:443 ssl http2 default_server;
# server_name _;
# root /usr/share/nginx/html;
#
# ssl_certificate "/etc/pki/nginx/server.crt";
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 10m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
#
# # Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
#
# location / {
# }
#
# error_page 404 /404.html;
# location = /40x.html {
# }
#
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
# }

}

nginx.conf(centos7 1.14)主配置文件修改的更多相关文章

  1. []转帖]linux 上修改了nginx.conf 怎么重新加载配置文件生效

    linux 上修改了nginx.conf 怎么重新加载配置文件生效 https://www.cnblogs.com/zhuyeshen/ 步骤如下先利用/usr/local/nginx/sbin/ng ...

  2. linux 上修改了nginx.conf 怎么重新加载配置文件生效

    步骤如下先利用/usr/local/nginx/sbin/nginx -t测试配置文件修改是否正常/usr/local/nginx/sbin/nginx -s reload重新加载 nginx 更改配 ...

  3. nginx产品环境安全配置-主配置文件

    以下配置为产品环境的nginx基于安全和效率的主配置文件,不包含fastcgi相关配置 cat /etc/nginx/nginx.conf user nginx; worker_processes a ...

  4. nginx.conf(centos6, 1.12)主配置文件修改

    #nginx1.12 centos6.xuser admin admin;worker_processes 4; error_log /data/services/logs/nginx_error.l ...

  5. Nginx安装与配置文件nginx.conf详解

    引用“http://ixdba.blog.51cto.com/2895551/790611” 1.安装Nginx在安装Nginx之前,需确保系统已经安装了gcc. openssl-devel. pcr ...

  6. nginx作为web服务以及nginx.conf详解

    Nginx系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 1.nginx简介 nginx是一个优秀的web服务程序.反向代理程序.它采用非 ...

  7. nginx.conf解读

    通常我们需要配置nginx.conf或者配置子项目的配置文件,那么我们需要解读它里面每一个参数的意义,就来个范例解读吧(有中午注释) #运行用户 user www-data; #启动进程,通常设置成和 ...

  8. Nginx安装,目录结构与配置文件详解

    1.Nginx简介 Nginx(发音同 engine x)是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like 协议下发行.由俄罗斯的程序设 ...

  9. <nginx.conf> nginx设置用户权限

    问题在于,我们使用weblogic在前台系统获取其他系统的文件,然后保存在webloigc目录下,然后配置了nginx来当http服务器,这样,其他的系统可以来下载文件,但是访问的时候提示403错误, ...

随机推荐

  1. [转帖]迎战AMD 7nm 64核EPYC 英特尔至强也玩起了胶水以及性价比

    迎战AMD 7nm 64核EPYC 英特尔至强也玩起了胶水以及性价比 Intel 最强CPU 从最开始的双核 到现在的 28核 发展迅猛. https://www.cnbeta.com/article ...

  2. [转帖]50个必知的Linux命令技巧,你都掌握了吗?

    50个必知的Linux命令技巧,你都掌握了吗? https://blog.51cto.com/lizhenliang/2131141 https://blog.51cto.com/lizhenlian ...

  3. vue中的跨域问题

    https://segmentfault.com/a/1190000011072725(原文)   使用vue-axios和vue-resource解决vue中调用网易云接口跨域的问题 注(api很重 ...

  4. C# Note15:设置Window图标的正确方式

    Windows Presentation Foundation(WPF)独立应用程序有两种类型的图标: 一个程序集(assembly) 图标,通过在应用程序的项目构建文件中使用<Applicat ...

  5. mac 中登陆mysql忘记密码解决办法

    1.打开终端,输入命令:cd /usr/local/mysql/bin 2.mysql -uroot -p,用这条命令登陆时报错信息: 报错:Enter password: ERROR 1045 (2 ...

  6. 替换JDK 对eclipse的影响?

    问题  替换原有的JDK 对 eclipse有影响么? 之前用的eclipse是32位的,我的电脑是64位的,装的JDK是也是32位的,所以不影响使用! 但是,前两天装了一个ideal,新配置了一个9 ...

  7. Ubuntu16.04网络不能访问解决办法

      问题: 系统重启后,网络不能正常使用,加载网络配置失败,且重启网络时也提示错误. 解决方法: 在定位的过程中发现是配置中的网络设备号与实际设备号不符. 1.查看网络配置中的配备号: vi /etc ...

  8. 学习 Spring (四) Bean 的生命周期

    Spring入门篇 学习笔记 定义 --> 初始化 --> 使用 --> 销毁 初始化 实现 org.springframework.beans.factory.Initializi ...

  9. cuda编程-卷积优化

    CUDA Convolution https://www.evl.uic.edu/sjames/cs525/final.html Improve Image Processing Using GPU ...

  10. Span<T>

    Introduction Span<T> is a new type we are adding to the platform to represent contiguous regio ...