docker-compose example nginx.conf produces card/caldav error

Created on 19 Nov 2019  路  6Comments  路  Source: nextcloud/docker

The actual example nginx.conf under

.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm/web/nginx.conf

contains a change in the card/calldav redirecting section (line 81 and 85):

return 301 $scheme://$host:$server_port/remote.php/dav;

If I use this I get an error in the _settings->overviev_ page inside nextcloud saying I should consult the docs:

docs.nextcloud.com #service-discovery

I checked my old config and found the :$server_port part is causing the problem. This fixes the problem:

return 301 $scheme://$host/remote.php/dav;

for both location = /.well-known/carddav and accordingly in the calldav section.

Someone else found this issue or is this wanted and just caused by my setup :) ?

kr Jens

examples

Most helpful comment

Same here. Reverting to the old state fixed the issue also for me.

All 6 comments

Same here. Reverting to the old state fixed the issue also for me.

Same here, removing :$server_port also solved the problem for me.

Not sure if this is the same but after updating to nc18 now I see the following in setting and security warnings:

Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.
Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation.

I can confirm monreals issue using docker hub image.

Can confirm the same is true for me with the nextcloud alpine-fpm image with nginx reverse-proxy

same here

a curl -I https://example.com/.well-known/carddav

responds with

...
location: http://example.com:80/remote.php/dav
...

when changing location = /.well-known/carddav ... and location = /.well-known/caldav to

return 301 https://$host/remote.php/dav;

then the warning disappears.

My question here is why are the nginx variables $scheme and $server_port are resolved to http and 80. Does it belongs to the fact that i'm using a proxy?

My setup is basically this one:

.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/fpm

Was this page helpful?
0 / 5 - 0 ratings