I want to move a ruby app from:
app.domain.com
To:
domain.com/app
Currently:
server_name app.domain.com
location / {
proxy_pass http://localhost:9001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
Is it possible to set something like:
server_name domain.com
location /app/ {
proxy_pass http://localhost:9001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
And add some directive in nginx that makes "domain.com/app/" the root of the application so I don't have to rewrite every path?
So that if the app has href="/" it translates to "domain.com/app/" instead of "domain.com/"?