server {
#下面这个部分和正常配置 https 没有什么区别
listen 9700 ssl;
server_name abc.kuaicaibao.cn;
#申请域名对应的证书
ssl_certificate /www/server/panel/vhost/cert/abc.kuaicaibao.cn/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/abc.kuaicaibao.cn/privkey.pem;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 SSLv2 SSLv3;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
ssl_verify_client off;
#反向代理 需要把后续.php 相关的和重写 index.php 的部分删除
location / {
proxy_redirect off;
proxy_pass http://127.0.0.1:9600; #转发到你本地的 9501 端口 对应 ws 的端口
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
}