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

Nginx reverse proxy and disable some webpage

$
0
0
I have a web server A and another server B running nginx.

A is internal network while B sit on DMZ where it run nginx and expose to the internet.
so user can browse all the site on A by accessing B via URL as B is using proxy_pass to A.


These are some of the URL i have
http://serverB.com/data/ver1/
http://serverB.com/data/ver2/
http://serverB.com/data/ver3/

I would like to do a URL rewriting so that it will look like
http://serverB.com/ver1/
http://serverB.com/ver2/
http://serverB.com/ver3/

what I did was

location /ver1 {
proxy_pass http://http://serverA.com/ver1
}


It works initially , but if i were to click a link in the page, the URL goes back to http://serverB.com/data/ver1/link/

how do i permanently rewrite the url of the page /

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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