NGINX生產環境反向代理到後端tomcat配置

卡子火發表於2018-06-29

#當訪問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;
        }
}

 

 

————————————————————-

作者:羅穆瑞

轉載請保留此段宣告,且在文章頁面明顯位置給出原文連結,謝謝!

——————————————————————————

如果覺得這篇文章對你有小小的幫助的話,記得在右下角點個“推薦”哦,博主在此感謝!

——————————————————————————


相關文章