server { listen 443; server_name server.sentiger.com; ssl on; root /home/wwwroot/Service/beta/public; index index.html index.htm index.php; ssl_certificate /etc/nginx/cert/1588339_server.sentiger.com.pem; ssl_certificate_key /etc/nginx/cert/1588339_server.sentiger.com.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL; ssl_prefer_server_ciphers on; location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php last;break; } } location ~ .+.php($|/) { set $script $uri; set $path_info "/"; if ($uri ~ "^(.+.php)(/.+)") { set $script $1; set $path_info $2; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php?IF_REWRITE=1; include fastcgi_params; fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$script; fastcgi_param SCRIPT_NAME $script; } location /ws/ { index index.html index.htm; #proxy_pass http://127.0.0.1:9509; proxy_pass http://127.0.0.1:9509/$is_args$args; proxy_http_version 1.1; proxy_connect_timeout 4s; #配置点1 proxy_read_timeout 600s; #配置点2,如果没效,可以考虑这个时间配置长一点 proxy_send_timeout 12s; #配置点3 proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } location /http/ { proxy_pass http://127.0.0.1:9503/$is_args$args; proxy_read_timeout 60s; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } error_page 500 502 503 504 /50x.html; }