map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream websocket {
server 47.106.179.46:448;
server 47.106.179.46:8383;
}
server {
listen 450 ssl;
server_name wx.yun-live.com;
ssl_certificate /www/server/panel/vhost/cert/wx.yun-live.com/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/wx.yun-live.com/privkey.pem;
ssl_session_timeout 20m;
ssl_verify_client off;
location / {
proxy_pass http:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
server
{
listen 80;
listen 443 ssl;
server_name wx.yun-live.com;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/wxyun/public;
ssl_certificate /www/server/panel/vhost/cert/wx.yun-live.com/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/wx.yun-live.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 497 https:
include enable-php-72.conf;
include /www/server/panel/vhost/rewrite/wx.yun-live.com.conf;
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
location ~ \.well-known{
allow all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
error_log off;
access_log /dev/null;
}
location ~ .*\.(js|css)?$
{
expires 12h;
error_log off;
access_log /dev/null;
}
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location /wss {
proxy_pass https:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
access_log /www/wwwlogs/wx.yun-live.com.log;
error_log /www/wwwlogs/wx.yun-live.com.error.log;
}
d切记要开启端口
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)