workman ssl推送很慢怎么解决

donghai

workman ssl推送很慢怎么解决

2828 3 0
3个回答

walkor 打赏

不用ssl就快?

  • donghai 2018-12-19

    对 ssl配置是按照文档配置的 证书也没问题

donghai

$context = ;
// PHPSocketIO服务
$sender_io = new SocketIO(2120, $context);

  • 暂无评论
walkor 打赏

你可以尝试用nginx或者apache代理试下,配置参考如下
server {
listen 443;

ssl on;
ssl_certificate /etc/ssl/server.pem;
ssl_certificate_key /etc/ssl/server.key;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_protocols SSLv3 SSLv2 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

location /socket.io
{
proxy_pass http://127.0.0.1:8282;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}

location / {} 站点的其它配置...

}
 

extra/httpd-ssl.conf

DocumentRoot "/网站/目录"
ServerName 域名

Proxy Config

SSLProxyEngine on

ProxyRequests Off
ProxyPass /socket.io ws://127.0.0.1:8282/socket.io
ProxyPassReverse /socket.io ws://127.0.0.1:8282/socket.io

添加 SSL 协议支持协议,去掉不安全的协议

SSLProtocol all -SSLv2 -SSLv3

修改加密套件如下

SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on

证书公钥配置

SSLCertificateFile /server/httpd/cert/your.pem

证书私钥配置

SSLCertificateKeyFile /server/httpd/cert/your.key

证书链配置,

SSLCertificateChainFile /server/httpd/cert/chain.pem
 
手册:http://doc.workerman.net/faq/secure-websocket-server.html
 
 

  • 暂无评论
年代过于久远,无法发表回答
×
🔝