nginx一些配置
- nginx转发websocket
location /statisServer/serverendpoint/ {
proxy_pass http://127.0.0.1:8093;
proxy_connect_timeout 2s;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
}
- nginx配置gzip
gzip on;
gzip_types application/json text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
- nginx转发socket
先码了