NC behind HAProxy in pfSense: Questions

Nextcloud version (eg, 20.0.5): 29.0.0-ls316
Operating system and version (eg, Ubuntu 20.04): linux
Apache or nginx version (eg, Apache 2.4.25): unknown -- running in a docker container
PHP version (eg, 7.4): unknown - running in a docker container

The issue you are facing:

As far as the requests for information above that I don’t know, I installed the latest version of Docker Sunday. Then I installed the latest version of portainer. I used portainer to find and install the latest version of Nextcloud that was available. Hopefully that’ll help fill in the gaps. If not and you need the info, please tell me where I can find it.

I have NC running as a container in a docker host. The host is at 10.10.0.10.

In pfSense, I created a virtual IP address (10.10.0.12) for HA to listen on. There is a DNS override pointing nc.home.mydomain.com at 10.1.0.12. I have a LetsEncrypt wildcard certificate for *.home.mydomain.com. HAProxy listens on 10.10.0.12:443 and redirects to 10.10.0.10:443.

pfSense is telling me that the NC “server is down”. When I browse to the actual host (bypassing HAProxy), it loads fine but just complains that it’s not secure.

I found this in the documentation on the NC website talking about running NC behind a proxy. But the section on HAProxy confuses me. What it seems to indicate I need to put in the config.php file doesn’t seem to match the format of the config.php file.

acl url_discovery path /.well-known/caldav /.well-known/carddav
http-request redirect location /remote.php/dav/ code 301 if url_discoveryacl url_discovery path /.well-known/caldav /.well-known/carddav
http-request redirect location /remote.php/dav/ code 301 if url_discovery

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html#haproxy

TIA!

Is this the first time you’ve seen this error? (Y/N):Y