美文网首页
linux 下nginx配置多域名多端口

linux 下nginx配置多域名多端口

作者: 三人_ | 来源:发表于2019-03-05 15:41 被阅读0次
server
{
    listen 80;
    server_name www.wstee.com;
    location / {
       proxy_pass http://127.0.0.1:81; 
      #需要代理的服务器
    }
}

server
{
    listen 80;
    server_name blog.wstee.com;
    location / {
        proxy_pass http://127.0.0.1:82;
        #需要代理的服务器
    }
}

#开启代理服务器
server
{
    listen 81;
    location / {
    }
}
server
{
    listen 82;
    location / {
    }
}

相关文章

网友评论

      本文标题:linux 下nginx配置多域名多端口

      本文链接:https://www.haomeiwen.com/subject/qfhouqtx.html