Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

proxy_pass and rewrite 404 issue

$
0
0
Hi


I use nginx as a proxy reverse and I need to setup the following:

https://server1/system/n1/tt needs to act as a proxy to http://server2:8088/tt

I have the follwoing setup in my server.conf:
...

location /system/n1/tt {
proxy_pass http://server2:8088/tt;
rewrite ^(/system/n1/tt)(.*)$ http://server2:8088/tt/$2 break;
...

This works and redirect to the URL http://server2:8088/tt/
What to do when I want to have in the URL https://server1/system/n1/tt ?
How to setup there the rewrite ?

Thanks in advance

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>