nginx-tutorial/demos/nginx-1.14.0/conf/nginx.conf

30 lines
855 B
Nginx Configuration File

worker_processes 1;
error_log logs/nginx-error.log info;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
log_format main '$remote_addr - "$upstream_addr" - [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "-" "$host"';
access_log logs/nginx-http-access.log;
sendfile on;
rewrite_log on;
keepalive_timeout 180;
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";
include mime.types;
include demos/*.conf;
}