Can not proxy nextcloud correctly

Nextcloud version---------------------Docker pull nextcloud
Operating system and version-----Debian GNU/Linux 9 (stretch)
Web server------------------------------Caddy in docker
Docker version-------------------------18.06.0-ce

The Caddyfile is:

proxy / {

It works well at the nextcloud config web page.I visit to login nextcloud,and it show the config web page.

But after I press the next button and hoping everything works perfectly,the browser jump to

What happened? Does the apache2 built in nextcloud docker send “” to Caddy?And Caddy just send this to me so everything go to the wrong direction?

How I can fix this?Do I have to config apache2 in the nextcloud docker?

I think you need to use the transparent (see directive on your proxy definition:

proxy / {

This will pass through the required headers to nextcloud, allowing it to respond with the hostname you would expect.

1 Like

Yep! Nextcloud expects to see the Host header. Without transparent, Caddy would ask for as the host, which Nextcloud uses to formulate its redirects.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.