SSPanel Uim+Soga要点

禁用PHP相关函数

system
putenv
popen
proc_open

Nginx中转

location /wspath {
    proxy_pass http://后端IP或域名:后端监听端口/wspath;  # 若后端开启tls,则需要写https://
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

偏移端口WS+TLS

ip;监听端口;2;ws;tls;path=/xxx|server=域名|host=CDN域名|outside_port=用户连接端口

配置后端Soga

vi /etc/soga/soga.conf
###基础配置###
node_id
proxy_protocol=false  #若使用HAProxy得开启
cert_file=            # 手动指定证书路径
key_file=             # 手动指定密钥路径

启动多实例Soga

yum -y install screen
screen -R soga1
vi /etc/soga/soga1.conf
/usr/local/soga/soga -c /etc/soga/soga1.conf
#在Screen终端下按下Ctrl+a d键

发表评论