Hello, i’ve been trying to host Plex behind Haproxy (on a VM) with PfSense as firewall.
Currently it works great, with one thing that bugs the hell out of me. Please note that I am new to HaProxy, or any proxy for that matter. Redirect and SSl offload works great for web interface, but i am still forced to forward a port for phone apps. Moreover, if i go to domain.com:32400 the web page loads unsecured.
I cannot find a way to redirect all plex traffic trough haproxy and close the external port. Current config:
frontend apps
mode http
bind *:80
bind *:443 ssl crt /etc/ssl/plex.domain.com/plex.domain.com.pem crt
http-request redirect scheme https unless { ssl_fc }
acl plex hdr(host) -i plex.domain.com
acl root_dir path_reg ^$|^/$
acl no_plex_header req.hdr_cnt(X-Plex-Device-Name) -i 0
redirect location http://plex.domain.com/web/index.html code 301 if no_plex_header root_dir plex
use_backend plex if plex
backend plex
mode http
server plex ip:32400 check
I’ll take any help i can get, i am quite stuck after scouring forums for a long time.
So again, i need to route traffic from port 32400 (for phone and tv apps) trough Haproxy and close the external plex remote port using only http\https.