nginx 80 端口 部署多个Web

1.修改默认nginx.conf 文件

加入 include /usr/www/ngconfs/*.conf;
读取ngconfs文件下所有 *.conf文件

2.ngconfs 下多个文件创建

第二步骤主要在于  监听80端口  

网站背后对应实际网站问端口4302,从而实现公用80端口 部署多个网站

location / {
  proxy_pass http://localhost:4302/;
}

3.重启nginx    输入命令nginx -s reload

posted @ 2018-08-16 14:36  年轻的资本!  阅读(6164)  评论(0编辑  收藏  举报