Welcome! Log In Create A New Profile

Advanced

proxy_pass and rewrite 404 issue

Posted by tomkribi 
proxy_pass and rewrite 404 issue
March 19, 2015 12:48PM
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
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 192
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready