首页 > 网站 > Nginx > 正文

nginx部署多个Web在80端口如何部署?

2024-08-30 12:22:52
字体:
来源:转载
供稿:网友
  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
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表