2 AIO instances behind pfsense/HAProxy

Hi all

I am trying to install 2 nextcloud instances (business and private) via docker AIO on a proxmox server behind a pfsense firewall. The proxy is done via HAProxy on pfsense. Both instances are installed on their own virtual machine and have their own fixed ip address.
I use this docker-compose file for the installation

services:
    all-in-one:
        image: 'nextcloud/all-in-one:latest'
        volumes:
            - '/var/run/docker.sock:/var/run/docker.sock:ro'
            - 'nextcloud_aio_mastercontainer:/mnt/docker-aio-config'
        ports:
            - '8843:8080'
        environment:
          - APACHE_PORT=11000
          - APACHE_IP_BINDING=0.0.0.0
          - NEXTCLOUD_DATADIR=/mnt/srv/ncdata
          - SKIP_DOMAIN_VALIDATION=true
        restart: always
        container_name: nextcloud-aio-mastercontainer
        init: true
volumes: # If you want to store the data on a different drive, see https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive
    nextcloud_aio_mastercontainer:
      name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work

They use the same frontend in HAProxy and have their own backend in which the difference between them is their ip address and port.
The first instance is reachable without any problem, it also gets a letsencrypt certificate from pfsense but the second instance is my problem child. The installation via docker-compose goes smoothly, can log into the AIO web page without any problem, select containers and they all come online.
However now when I try to reach this nextcloud-instance via the url I keep getting error 503 - Service Unavailable but I do get the correct letsencrypt certificate for this subdomain.
Is there anyone who has a similar setup and can steer me in the right direction to get both instances working.

Hi, see all-in-one/multiple-instances.md at main · nextcloud/all-in-one · GitHub

Hi,

The web page you refer to is with caddy as a reverse proxy. This is not an option for me right now because I already use HAProxy as a reverse proxy for other web servers.
Currently all internet traffic on port 80 and 443 is forwarded to a Virtual IP address which then based on url forwards it to the correct server and port.
So for days I have been racking my head as to why it is that the first nextcloud instance is reachable and the second instance is not reachable on a different ip-address and port while the settings in HAProxy are identical as the first instance except for ip-address and port.