Please help, I am trying to proxy pass my domain.com/travel to a node app that has the content running here 255.255.255.255:1234/travel ... How do I do this?
I currently have this:
location /travel/ {
rewrite ^/travel(/.*)$ $1 break;
proxy_pass http://255.255.255.255:1234/travel;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
This partially works but it goes to the root of the application in http://255.255.255.255:1234 instead. I was able to do this in Apache with this
ProxyPreserveHost On
ProxyPass /travel/ http://255.255.255.255:1234/travel/
ProxyPassReverse /travel/ http://255.255.255.255:1234/travel/
ProxyPass /travel http://255.255.255.255:1234/travel/
ProxyPassReverse /travel http://255.255.255.255:1234/travel/
but since moving to Nginx I cannot replicate this. Help?