Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Nginx proxy_pass not working as expected. (3 replies)

$
0
0
Hi

I have the virtualhost file configured as the following:-

server {
server_name example.com;

location / {
proxy_pass http://example.org;
}
}


When I visit example.com it redirects correctly to example.org, but I need it to show example.com in the address bar. How can I do this?

i tried changing it to

location / {
proxy_pass http://example.org;
proxy_set_header Host example.com;
}
}

but it still shows example.org in the address bar, what do I need to do?

Thanks

Viewing all articles
Browse latest Browse all 7229

Trending Articles



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