| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- # run nginx in foreground
- daemon off;
- user root;
- # Set number of worker processes automatically based on number of CPU cores.
- worker_processes auto;
- # Enables the use of JIT for regular expressions to speed-up their processing.
- pcre_jit on;
- error_log /config/logs/error.log warn;
- # Includes files with directives to load dynamic modules.
- include /etc/nginx/modules/*.conf;
- events {
- worker_connections 1024;
- }
- http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- sendfile on;
- server_tokens off;
- tcp_nopush on;
- tcp_nodelay on;
- client_body_temp_path /tmp/nginx/body 1 2;
- keepalive_timeout 65;
- ssl_prefer_server_ciphers on;
- gzip on;
- proxy_ignore_client_abort off;
- client_max_body_size 2000m;
- proxy_http_version 1.1;
- proxy_set_header X-Forwarded-Scheme $scheme;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Accept-Encoding "";
- proxy_cache off;
- proxy_cache_path /var/lib/nginx/cache/public levels=1:2 keys_zone=public-cache:30m max_size=192m;
- proxy_cache_path /var/lib/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;
- # MISS
- # BYPASS
- # EXPIRED - expired, request was passed to backend
- # UPDATING - expired, stale response was used due to proxy/fastcgi_cache_use_stale updating
- # STALE - expired, stale response was used due to proxy/fastcgi_cache_use_stale
- # HIT
- # - (dash) - request never reached to upstream module. Most likely it was processed at Nginx-level only (e.g. forbidden, redirects, etc) (Ref: Mail Thread
- log_format proxy '[$time_local] $upstream_cache_status $upstream_status $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] [Sent-to $server] "$http_user_agent" "$http_referer"';
- access_log /config/logs/default.log proxy;
- include /etc/nginx/conf.d/*.conf;
- include /config/nginx/*.conf;
- }
- stream {
- include /config/nginx/stream/*.conf;
- }
|