@viragomann said in HAProxy path problem (truenas ui + webdav port):
the bottom of the "Settings" page you can see a "Show" button, which can be used to display the HAproxy settings.
No it is the current state as of the post. i get a 503 for use case (2).
The backend device is expecting the path yes "/android" as that is the share name. let's assume there's only ever going to be one share by the way being served by port 8081.
config (obfuscated somewhat)
frontend frontend_domain_com
bind 192.168.10.1:443 name 192.168.10.1:443 ssl crt-list /var/etc/haproxy/frontend_domain_com.crt_list
mode http
log global
option http-keep-alive
timeout client 30000
acl truenas var(txn.txnhost) -m str -i truenas.domain.com
acl truenas_a_1 var(txn.txnpath) -m str -i /android
acl truenas_a_2 var(txn.txnpath) -m beg -i /android/
acl truenas_a_1_neg var(txn.txnpath) -m str -i /android
acl truenas_a_2_neg var(txn.txnpath) -m beg -i /android/
acl aclcrt_frontend_domain_com var(txn.txnhost) -m reg -i ^([^\.]*)\.domain\.com(:([0-9]){1,5})?$
http-request set-var(txn.txnhost) hdr(host)
http-request set-var(txn.txnpath) path
use_backend truenas_ipvANY if truenas !truenas_a_1_neg !truenas_a_2_neg aclcrt_frontend_domain_com
use_backend truenas_webdav_ipvANY if truenas truenas_a_1 truenas_a_2 aclcrt_frontend_domain_com
backend truenas_ipvANY
mode http
id 100
log global
timeout connect 30000
timeout server 30000
retries 3
load-server-state-from-file global
server truenas 192.168.10.9:443 id 101 ssl check inter 1000 verify none
backend truenas_webdav_ipvANY
mode http
id 115
log global
timeout connect 30000
timeout server 30000
retries 3
load-server-state-from-file global
http-request replace-path /android\/?(.*) \/\1
server truenas_webdav 192.168.10.9:8081 id 101 ssl check inter 1000 verify none
thx