No realms after reverse-proxying with HAProxy

keksbg

New Member
Jul 22, 2020
2
0
1
26
Hello, as the title suggests I am having issues with logging in when I reverse-proxied my Proxmox VE instance behind HAProxy. Although logging in directly via the IP works fine, the reverse-proxy shows absolutely no realms as an option. No list to select from, none selected by default and no way to input them.
My current realms are the standard ones (PAM & Proxmox authentication server) and I have got the following configuration for HAProxy (intentionally cut out some parts of it since they aren't needed)

Code:
global
    maxconn     100000
    log         127.0.0.1:514 local0 info
    user        haproxy
    chroot      /usr/share/haproxy
    pidfile     /run/haproxy.pid
    daemon
    ssl-default-bind-options ssl-min-ver TLSv1.2

frontend keksbg.dev
    bind :80
    bind :443           ssl     crt /etc/ssl/keksbg.dev/merge.pem
    mode                http
    log                 global
    option              httplog
    option              dontlognull
    option              http_proxy
    option forwardfor   except 127.0.0.0/8
    timeout             client  30s
    http-request redirect scheme https unless { ssl_fc }
    acl api     path_beg        -i /api /metrics
    acl grafana hdr_beg(host)   -i grafana
    acl pxmx    hdr_beg(host)   -i proxmox

    use_backend api             if api
    use_backend grafana         if grafana
    use_backend pxmx            if pxmx
    default_backend             nginx

    // all the other backends

backend pxmx
    log         global
    mode        http
    balance     roundrobin
    timeout     connect 5s
    timeout     server  30s
    timeout     queue   30s
    server      pxmx 192.168.1.22:8006  ssl     verify none
If you need any additional information, let me know.
Best regards.
 
I see, I'll look into it. In the meantime, could you give me an example of how I would implement both of the things you listed? Thanks.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!