HA Proxy pfsense and octoprint

hi to all, i have one problem, i need configure haproxy under pfsenso for remote connection on https.

now i have 1 server homeassistant on ha proxy and work fine, now i would configure other url for octopi.

on frontend i create an acl "host end with: /octopi" use backend "octopi"

on backend i configure ip + port 192.168.1.36:5000

but i recive error 503 on browser

hello manustar,

reading your description I feel a bit lost,
including (uploading)

  • /var/log/haproxy.log
  • /etc/haproxy/haproxy.cfg

may improve the chances someone spots the problem.

Have you seen this thread?

I see the post, and i implement only octoprint and no see login page

the haproxy.log is empty

this my config

Automaticaly generated, dont edit manually.

Generated on: 2021-11-01 12:25

global
maxconn 100
stats socket /tmp/haproxy.socket level admin expose-fd listeners
uid 80
gid 80
nbproc 1
nbthread 1
hard-stop-after 15m
chroot /tmp/haproxy_chroot
daemon
tune.ssl.default-dh-param 2048
server-state-file /tmp/haproxy_server_state

listen HAProxyLocalStats
bind 127.0.0.1:2200 name localstats
mode http
stats enable
stats admin if TRUE
stats show-legends
stats uri /haproxy/haproxy_stats.php?haproxystats=1
timeout client 5000
timeout connect 5000
timeout server 5000

resolvers globalresolvers
nameserver INTERNAL 192.168.1.254:53
resolve_retries 3
timeout retry 1s
timeout resolve 10s

frontend JARVIS
bind 127.0.0.1:9443 name 127.0.0.1:9443 ssl crt-list /var/etc/haproxy/JARVIS.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 octopi var(txn.txnhost) -m end -i /octopi
acl aclcrt_JARVIS var(txn.txnhost) -m reg -i ^mydnsnam.duckdns.org(:([0-9]){1,5})?$
http-request set-var(txn.txnhost) hdr(host)
use_backend octopi_ipvANY if aclcrt_JARVIS
use_backend JARVIS_ipvANY if aclcrt_JARVIS

backend octopi_ipvANY
mode http
id 102
log global
timeout connect 30000
timeout server 30000
retries 3
option forwardfor
server 192.168.1.36 192.168.1.36:5000 id 103 resolvers globalresolvers

backend JARVIS_ipvANY
mode http
id 100
log global
errorfile 503 /var/etc/haproxy/errorfile_JARVIS_ipvANY_503_Errore
timeout connect 30000
timeout server 30000
retries 3
server HomeAssistant 192.168.1.5:8123 id 101 resolvers globalresolvers

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.