I personally use nginx for my reverse proxy in front of cpvm (and ssvm):

https://github.com/apache/cloudstack/discussions/11562#discussioncomment-15014257

I know this is about HAProxy but you might be able to pull some relevant information from there.

On 5/13/26 8:55 AM, Ron Gage wrote:
Hi everyone!

I am experimenting with using HAProxy as my public front end to my
CPVM.  It is not going well.

I was hoping that someone could offer up some hints on how to make this
work.  Here is the meat of my current config:

frontend console_proxy_frontend
     bind *:443 ssl crt /etc/haproxy/certs/cpv.mi-connect.com.pem
     mode http
     # Required for WebSockets (used in CloudStack 4.11+)
     option forwardfor
     acl is_websocket hdr(Upgrade) -i WebSocket
     use_backend cpvm_backend  if is_websocket
     default_backend cpvm_backend

frontend websocket_frontend
#    bind *:8000
     bind *:8080 ssl crt /etc/haproxy/certs/cpv.mi-connect.com.pem
     mode http
     default_backend cpvm_backend

backend cpvm_backend
     mode http
     balance roundrobin
     # Enable WebSocket support
     option http-server-close
     option forwardfor
     http-request set-header X-Forwarded-Port %[dst_port]
     http-request add-header X-Forwarded-Proto https if { ssl_fc }

     server cpvm1 192.168.1.10:80 check
#    server cpvm2 192.168.1.102:8080 check


Thanks!

Ron Gage

Reply via email to