nginx.conf(centos7 1.14)主配置文件修改
#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)主配置文件修改的更多相关文章
- []转帖]linux 上修改了nginx.conf 怎么重新加载配置文件生效
linux 上修改了nginx.conf 怎么重新加载配置文件生效 https://www.cnblogs.com/zhuyeshen/ 步骤如下先利用/usr/local/nginx/sbin/ng ...
- linux 上修改了nginx.conf 怎么重新加载配置文件生效
步骤如下先利用/usr/local/nginx/sbin/nginx -t测试配置文件修改是否正常/usr/local/nginx/sbin/nginx -s reload重新加载 nginx 更改配 ...
- nginx产品环境安全配置-主配置文件
以下配置为产品环境的nginx基于安全和效率的主配置文件,不包含fastcgi相关配置 cat /etc/nginx/nginx.conf user nginx; worker_processes a ...
- nginx.conf(centos6, 1.12)主配置文件修改
#nginx1.12 centos6.xuser admin admin;worker_processes 4; error_log /data/services/logs/nginx_error.l ...
- Nginx安装与配置文件nginx.conf详解
引用“http://ixdba.blog.51cto.com/2895551/790611” 1.安装Nginx在安装Nginx之前,需确保系统已经安装了gcc. openssl-devel. pcr ...
- nginx作为web服务以及nginx.conf详解
Nginx系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 1.nginx简介 nginx是一个优秀的web服务程序.反向代理程序.它采用非 ...
- nginx.conf解读
通常我们需要配置nginx.conf或者配置子项目的配置文件,那么我们需要解读它里面每一个参数的意义,就来个范例解读吧(有中午注释) #运行用户 user www-data; #启动进程,通常设置成和 ...
- Nginx安装,目录结构与配置文件详解
1.Nginx简介 Nginx(发音同 engine x)是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like 协议下发行.由俄罗斯的程序设 ...
- <nginx.conf> nginx设置用户权限
问题在于,我们使用weblogic在前台系统获取其他系统的文件,然后保存在webloigc目录下,然后配置了nginx来当http服务器,这样,其他的系统可以来下载文件,但是访问的时候提示403错误, ...
随机推荐
- API接口TOKEN设计
首先需要知道API是什么? API(Application Programming Interface)即应用程序接口.你可以认为 API 是一个软件组件或是一个 Web 服务与外界进行的交互的接 ...
- Redis教程(Windows)
安装 1)下载redis压缩包并 , 推荐地址:https://github.com/MSOpenTech/redis/releases Redis 支持 32 位和 64 位.这个需要根据你系统平 ...
- web安全测试排查
漏洞排查思路: 1.上传漏洞 如果看到:选择你要上传的文件 [重新上传]或者出现“请登陆后使用”,80%就有漏洞了! 有时上传不一定会成功,这是因为Cookies不一样.我们就要用WSockExper ...
- 前端知识点总结(HTML)
前端知识点总结(HTML) 一,头部常用的标签 1,link标签 (1),设置ico图标 <link rel="shortcut icon" href="favi ...
- composer 自动加载一 通过file加载
github地址 https://github.com/brady-wang/composer composer init 可以生成一个composer.json文件 { "name&quo ...
- Angular 基本指令
<!DOCTYPE html><html ng-app><head lang="en"> <meta charset="UTF- ...
- servlet中将值以json格式传入
详细连接https://blog.csdn.net/e_wsq/article/details/71038270$('#but_json_json').click(function(){ }; $.a ...
- CentOS6.8 安装配置Mysql
1.下载mysql的repo源 wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2.安装mysql-commun ...
- 创建安全客户端Socket
SocketFactory factory = SSLSocketFactory.getDefault(); Socket socket = factory.create("localhos ...
- Python魔法方法(magic method)细解几个常用魔法方法(下)
接上文,再介绍最后几个常用的魔法方法. 关于__dict__: 先上个例子: class Test(object): fly = True def __init__(self, age): self. ...