So i have a pfsense gateway, and 2 vms behind it.
I have nextcloud in one, and CODE in the other.
I have configured everything and it worked for a week or so with no problems.
Now, i cannot edit documents if i access the instance (nextcloud+code) from another location except one in particular (where i work).
So the pfsense gateway has a public ip. There are no direct connections to those vms.
So if i try to open a document from home for example, the editor does not load.
If i try this from the workplace (on the same public URL), it works.
This is the haproxy config on the pfsense gateway
frontend https_proxy
bind xxxxxxx:443 name xxxxxx:443 ssl crt-list /var/etc/haproxy/https_proxy.crt_list
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
timeout client 30000
acl nextcloud_ACL var(txn.txnpath) -m beg -i /nextcloud
acl office_ACL var(txn.txnhost) -m str -i office.xxx.xx
acl aclcrt_https_proxy var(txn.txnhost) -m reg -i ^cloud.xxx.xx(:([0-9]){1,5})?$
acl aclcrt_https_proxy var(txn.txnhost) -m reg -i ^office.xxx.xx(:([0-9]){1,5})?$
http-request set-var(txn.txnpath) path
http-request set-var(txn.txnhost) hdr(host)
http-request deny if { req.hdr_cnt(content-length) gt 1 }
http-response deny if { res.hdr_cnt(content-length) gt 1 }
use_backend cloud.xxx.xx_ipvANY if nextcloud_ACL aclcrt_https_proxy
use_backend office.xxx.xx_ipvANY if office_ACL aclcrt_https_proxy
backend cloud.xxx.xx_ipvANY
mode http
id 100
log global
timeout connect 30000
timeout server 30000
retries 3
option httpchk OPTIONS /
server cloud.xxx.xx 10.0.101.1:80 id 101 check inter 1000
backend office.xxx.xx_ipvANY
mode http
id 102
log global
timeout connect 30000
timeout server 30000
retries 3
server office.xxx.xx 10.0.101.2:9980 id 103 check inter 1000
I simply dont understand why is would work in one place and not another, since im using the same public hostname.
Im thinking that maybe haproxy has something to do with it, but i cannot think of anything.
Has anyone ever had a situation like this ?