NGINX生产环境反向代理到后端tomcat配置

#当访问www.kazihuo.com//sichuan-user-te时,跳转到http://10.1.93.61:7005/sichuan-user

server {
        listen       80;
        server_name  218.80.250.99 qyj.kazihuo.com www.sheyecare.com www.kazihuo.com www.kazihuo.com;

location /sichuan-user-te/ {
        proxy_pass http://10.1.93.61:7005/sichuan-user/;
        proxy_set_header      Host $host;
        proxy_set_header      X-Real-IP $remote_addr;
        proxy_set_header      X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

=================================================================

#当访问http://218.80.250.99/healthcloud-doctor-web时,跳转到http://10.1.65.133:7003/healthcloud-doctor-web

server {
        listen       80;
        server_name  218.80.250.99 qyj.kazihuo.com www.sheyecare.com www.kazihuo.com www.kazihuo.com;

location /healthcloud-doctor-web {
        proxy_pass http://10.1.65.133:7003;
        proxy_set_header      Host $host;
        proxy_set_header      X-Real-IP $remote_addr;
        proxy_set_header      X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

 

 

-------------------------------------------------------------

作者:罗穆瑞

转载请保留此段声明,且在文章页面明显位置给出原文链接,谢谢!

------------------------------------------------------------------------------

如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!

------------------------------------------------------------------------------

上一篇:Docker容器加载宿主机的hosts解析


下一篇:Python字符串颜色输出