安装LNMP稳定版只需要安装nginx
wget http://soft.vpser.net/lnmp/lnmp1.9.tar.gz -cO lnmp1.9.tar.gz && tar zxf lnmp1.9.tar.gz && cd lnmp1.9 && ./install.sh nginx
添加网站(虚拟主机)
lnmp vhost add
编辑网站nginx配置文件
cd usr/local/nginx/conf/vhost
ls
xxx.com.conf
配置Nginx文件,将下列代码插入nginx文件中,注意端口、路径要保持一致
location /app { proxy_redirect off; proxy_pass http://127.0.0.1:8443; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; }