
配置教程:https://www.gworg.com/ssl/309.html
源码规范:https://www.gworg.com/ssl/191.html
OneinStack包含以下组合:lnmp(Linux + Nginx+ MySQL+ PHP)
LNMP安装SSL安全证书 部署HTTPS:https://www.gworg.com/ssl/309.html
lamp(Linux + Apache+ MySQL+ PHP)
APACHE安装SSL证书:https://www.gworg.com/ssl/106.html
Apache自动跳转到 HTTPS:https://www.gworg.com/ssl/130.html
lnmpa(Linux + Nginx+ MySQL+ PHP+ Apache):Nginx处理静态,Apache(mod_php)处理动态PHP
Nginx安装SSL证书:https://www.gworg.com/ssl/107.html
Nginx 自动跳转到HTTPS:https://www.gworg.com/ssl/167.html
lnmt(Linux + Nginx+ MySQL+ Tomcat):Nginx处理静态,Tomcat(JDK)处理JAVA
lnmh(Linux + Nginx+ MySQL+ HHVM)
根据下图的nginx升级说明,nginx从1.3.13版本之后才开始支持websocket代理的功能。
因此,要在lnmp集成环境中使用nginx的websocket代理服务,首先必须确认你的nginx版本要高于1.3.13版本。
对于配置就很简单了,具体的配置如下所示:
http {upstream wsbackend {
server 127.0.0.1:3000 # websocket服务器后端地址
}
server {
listen 8080
location / {
# 如下是对websocket代理的配置代码.
proxy_pass http://wsbackend
proxy_http_version 1.1
proxy_set_header Upgrade $http_upgrade
proxy_set_header Connection "Upgrade"
}
}
如上的配置会将8080端口收到的搜友的websocket请求代理到wsbackend中的机器中。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)