[nextcloud] - run in subfolder. example.com/nextcloud #183
Description
Hi,
Thanks for building a awesome docker image. How do I go about running nextcloud in example.com/nextcloud ?
I am running Nginx locally and do a proxy reverse to the running container localhost:8888. When I access nextcloud in location block, it redirects back to example.com/login and fails. Problem is, if I set webroot in Nextcloud config.php to /nextcloud I get stuck in a redirect loop.
I have tried to use subfilter rules, but images and css get broken.
location /nextcloud/ { proxy_pass http://localhost:8888/; auth_basic off; 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-Remote-Port $remote_port; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; }
My sub_filter loads login page but with no css. When I edit config.php (overwritewebroot) to include /nextcloud everything breaks..
proxy_set_header Accept-Encoding ""; sub_filter "http://server.domain/" "http://server.domain/nextcloud/"; sub_filter_once on;