user nginx; worker_processes 16; error_log /var/nginxlog/error.log info; worker_rlimit_nofile 10240; events { worker_connections 8192; multi_accept on; use epoll; } http { include mime.types; default_type application/octet-stream; underscores_in_headers on; client_max_body_size 32M; client_body_buffer_size 1024K; tcp_nopush on; sendfile on; keepalive_timeout 300; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; server { listen 80; set $folder_name /var/www/html; server_name gxweb.yescoin.com.cn; root $folder_name; index index.html index.php; proxy_connect_timeout 500s; proxy_read_timeout 500s; proxy_send_timeout 500s; fastcgi_connect_timeout 75; fastcgi_read_timeout 600; fastcgi_send_timeout 600; fastcgi_buffer_size 32K; fastcgi_buffers 32 32K; set_real_ip_from 100.64.0.0/10; real_ip_header X-Forwarded-For; charset utf-8; location /logs { deny all; return 403; } location /data/log { deny all; return 403; } location / { index index.html index.htm index.php; } location /mshop { root $folder_name; autoindex on; index index.html index.htm index.php; try_files $uri $uri/ /mshop/index.html; } location /plot { root $folder_name; proxy_pass http://172.26.105.126:5000; proxy_redirect off; 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; } location /merchant { root $folder_name; autoindex on; index index.html index.htm index.php; try_files $uri $uri/ /merchant/index.html; } location ~ /mobile/[/\w]+\.php$ { deny all; return 403; } location ~ /mobile/[/\w]+\.html$ { try_files $uri $uri/ /mobile/index.html; } # location ~ /mchsrv/[/\w]+\.php$ { # root $folder_name; # fastcgi_pass gxmch:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name; # fastcgi_param SIGN $http_sign; # include fastcgi_params; # } location ~ \.php$ { add_header Cache-Control no-store; root $folder_name; fastcgi_pass web:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name; fastcgi_buffer_size 1024K; fastcgi_buffers 32 1024K; proxy_buffer_size 128k; #设置缓冲区的大小和数量 proxy_buffers 100 128k; # proxy_read_timeout 900s; proxy_send_timeout 900s; fastcgi_read_timeout 900; fastcgi_send_timeout 900; keepalive_timeout 900; include fastcgi_params; } } }