I have setup two servers with nginx -
- https://dev.imagecompressor.io at 35.231.119.158
- https://imagecompressor.io at 176.9.41.138
I am trying to forward https://imagecompressor.io/site
to https://dev.imagecompressor.io/site
& want the url remain https://imagecompressor.io/site
.
Forwarding is doing ok but the subdirectory /site/
seems to be omitted & URL is also changed.
NGINX configuration at 176.9.41.138
location /site/ {
proxy_pass http://dev.imagecompressor.io;
# error_log /var/log/nginx/site_error.log debug;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host imagecompressor.io;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}