Nextcloud bad share & webdav URL

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Hello !

I have a little problem on my fresh install of nextcloud ( replace owncloud !!)

Here is my infra:
I have an apache listening on port 443 and 80 and redirecting to my dockers who turns them on 127.0.0.1:XXXX

All work perfectly except sharing and webdav on nextcloud.

I have a problem with my Nextcloud instance.
When I want to share files with a URL, the generic url uses ip or walks nextcloud (http://127.0.0.1:8080/s/D6FkbYiCsd5izTo) and not http://mydomainname.com/s/D6FkbYiCsd5izTo

Problem simalary for webdav

I changed this value on config.php:

 'overwrite.cli.url' => 'http://mydomainname.com'

and

0 => 'mydomainname.com'

And that did not solve the sharing problem.

On my owncloud y don’t have this bug…

Do you have an idea ?

Thank you for your help

Nextcloud 16.0.4** on docker (latest stable version)
Server version: Apache/2.4.38 (Debian 10)

You probably need to set the overwritehost parameter.

https://docs.nextcloud.com/server/16/admin_manual/configuration_server/reverse_proxy_configuration.html#overwrite-parameters

I set the overwritehost and overwriteprotocol

its work, thank you so much