美文网首页
nginx把顶级域名和二级域名指向不同端口的tomcat

nginx把顶级域名和二级域名指向不同端口的tomcat

作者: westinyang | 来源:发表于2017-03-24 12:46 被阅读0次
    server {
        listen       90;
        server_name  io.ceadeal.com;
        location / {
            proxy_pass http://localhost:9001;
            proxy_set_header XHost $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
    server {
        listen       90;
        server_name  blog.ceadeal.com;
        location / {
            proxy_pass http://localhost:9002;
            proxy_set_header XHost $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }

相关文章

网友评论

      本文标题:nginx把顶级域名和二级域名指向不同端口的tomcat

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