2019-10-29 18:22:19 +08:00
|
|
|
worker_processes 1;
|
2019-05-15 22:43:15 +08:00
|
|
|
|
2019-10-29 18:22:19 +08:00
|
|
|
error_log logs/error.log;
|
|
|
|
#error_log logs/error.log notice;
|
|
|
|
#error_log logs/error.log info;
|
|
|
|
pid /usr/local/nginx/logs/nginx.pid;
|
2019-05-15 22:43:15 +08:00
|
|
|
|
|
|
|
events {
|
2019-10-29 18:22:19 +08:00
|
|
|
worker_connections 1024;
|
2019-05-15 22:43:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
2019-10-29 18:22:19 +08:00
|
|
|
include mime.types;
|
|
|
|
include conf.d/*.conf;
|
|
|
|
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
#access_log logs/nginx-http-access.log;
|
|
|
|
|
|
|
|
sendfile on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
|
|
|
client_max_body_size 20m;
|
|
|
|
client_body_buffer_size 128k;
|
|
|
|
|
|
|
|
#common header set
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2019-05-15 22:43:15 +08:00
|
|
|
}
|