nginx配置HTTPS WSS
cat backend/wssns.cai.com.conf
server {
listen *:80;
listen [::]:80;
listen *:443 ssl;
listen [::]:443 ssl;
server_name wssns.cai.com;
access_log /var/log/nginx/wssns.cai.com.log;
root /var/www/api.sns.cai.com/public;
index index.php index.html index.htm;
# ssl on;
ssl_certificate /etc/nginx/ssl/cai.crt;
ssl_certificate_key /etc/nginx/ssl/cai.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://172.16.200.10:9501;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
see also
建立一个HTTPS的测试网络钱包
nginx配置HTTPS WSS