这里用的是小皮面板(PHPStudy),先添加网站。

找到nginx/conf/vhost/网站.conf,server中原先的location全删了,改为下面:

1
2
3
4
5
6
7
server {
listen 80;
server_name cloud.iwxyi.com;
location / {
proxy_pass http://iwxyi.com:5212;
}
}

其余配置如root等都不需要了。

访问cloud.iwxyi.com,都会变成http://iwxyi.com:5212