nginx configuration
server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/**/**.pem;
ssl_certificate_key /etc/letsencrypt/live/**/**.key;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_dhparam /opt/dhparam/keys/dhparams.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "***";
ssl_prefer_server_ciphers on;
server_name xcx.test.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:9023;
proxy_redirect off;
}
location /websocket/ {
proxy_pass http://127.0.0.1:9092;
-sharp WebScoket Support
-sharp proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
-sharp proxy_set_header Origin xxx;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
}
}