So I'm trying to have an instance of OwnCloud running via a docker image behind an nginx https reverse proxy and need to re-write the path via the reverse proxy so that instead of going to https://my-server/ to get to OwnCloud, you use https://my-server/cloud to get to it.
My current reverse-proxy location block looks like this:
location /cloud {
rewrite /cloud/(.*) /$1 break;
proxy_pass http://localhost:8080;
proxy_redirect off;
proxy_set_header Host $host;
}
But this only half-works. When I navigate to htts://my-server/cloud, I get an OwnCloud generated 404 error and then if I click 'take me back to OwnCloud', it redirects me to https://my-server/index.php which results in an nginx level 404 because the redirect should go to https://my-server/cloud/index.php.
I'm thinking I may be hosed and need to modify the OwnCloud configurations so it returns links with the /cloud appended but I have no clue how to do that via a docker image. Appreciate any help on this.