I have a django-cms application running behind a nginx server. I am using proxy_pass to send traffic to the cms application. I am using location /django-cms , so when I go to https://nginxserver/django-cms It actually works and send the traffic to the CMS server, however the CMS application is sending back a 302 response and the response contains Location: en/ , so the browser tries to hit https://nginxserver/en/ instead f https://nginxserver/django-cms/en. This obviously results in a 404 error. How can I make sure that everything meant for the CMS server hits https://nginxserver/django-cms/ ?
Here is the relevant section from the nginx.conf file.
location /django-cms {
auth_request /request_validate;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://10.0.2.29:8000;
}