Nextcloud with pfSense HA Proxy

Hello,

I’m currently trying to get Nextcloud setup with HAproxy on pfSense. I use SSL offloading with HAproxy and I’m running into the issue with the desktop client being unable to connect and running a loop. Wondering if anyone is able to assist me on as to why that is?

HA Proxy conf for Nextcloud

frontend Public-Access-Allow
	bind			WANIP:80 name WANIP:80   
	bind			WANIP:443 name WANIP:443   ssl crt-list /var/etc/haproxy/Public-Access Allow.crt_list crt-ignore-err all  
	mode			http
	log			    global
	option			http-keep-alive
	option			forwardfor
	acl https ssl_fc
	http-request set-header		X-Forwarded-Proto http if !https
	http-request set-header		X-Forwarded-Proto https if https
	maxconn			100
	timeout client		30000
	acl			Cloud_ACL	var(txn.txnhost) -m beg -i cloud.domain.com
	
    http-request set-var(txn.txnhost) hdr(host)
    use_backend Cloud_ipv4  if  Cloud_ACL aclcrt_Public-Access-Allow

backend Cloud_ipv4
	mode			http
	id			10101
	log			global
	errorfile			503 /var/etc/haproxy/errorfile_Cloud_ipv4_503_Maintainence
	timeout connect		30000
	timeout server		30000
	retries			3
	server			cloud.domain.com 10.10.2.8:80 id 10103

Config.php file output

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => '10.10.2.8',
    1 => 'cloud.domain.com',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.0.10',
  'overwrite.cli.url' => 'https://cloud.domain.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextclouduser',
  'dbpassword' => '',
  'installed' => true,
  'maintenance' => false,
  'app_install_overwrite' =>
  array (
    0 => 'unsplash',
  ),
);

/etc/apache2/sites-enabled/000-default.conf


<VirtualHost *:80>

        ServerName cloud.domain.com
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/nextcloud
     <Directory /var/www/html/nextcloud/>
       Options +FollowSymlinks
        AllowOverride All
        Require all granted
          <IfModule mod_dav.c>
            Dav off
          </IfModule>
        SetEnv HOME /var/www/html/nextcloud
        SetEnv HTTP_HOME /var/www/html/nextcloud
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined


        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Any assistance is greatly appreciated!!!

If you expect someone to help, you’ll probably have to add more details (logs). Webinterface and webdav are working?