nginx conf global parameter configuration
怪我咯
怪我咯 2017-05-16 17:26:45
0
1
429

First of all, I don't quite understand how to describe the problem. So I wrote this title.
The actual situation is that I allocated two addresses in the js of the project:

serviceLoginUrl:"/arg/project/Login";
serviceUrl:"/arg/project/Webservice";

I think when nginx is running, nginx can directly parse /arg/project and replace it with
http://172.16.1.101:9080/myPro/Login and http://172.16.1.101:9080 A real address like /myPro/WebserviceX5X is a regular expression. I saw someone else implement it in apache like this. But I am using nginx and I don’t want to change apache. Please give me some answers from those who are familiar with nginx.

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
PHPzhong

location /arg/project/Login {
rewrite ^/arg/project/Login$ /myPro/Login last;
proxy_pass http://service_server;
}

upstream service_server {
http://172.16.1.101:9080;
}

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!