Proxmox server as backend of apache reverse proxy

amado

New Member
Hello.
The first is to congratulate the team who have made this great server virtualization.
Second apologize for my bad English.
I have installed Proxmox behind a apache reverse proxy like this:

ServerName proxmox.xxxxx.xxxxx.xxx
ProxyRequests off
ProxyPreserveHost on
SSLProxyEngine on


ProxyPass / https://proxmox.xxxxx.dmz:8006/
ProxyPassReverse / https://proxmox.xxxxx.dmz:8006/


SSLCertificateFile /etc/ssl/certs/www.crt
SSLCertificateKeyFile /etc/ssl/private/www.key
SSLEngine on



The web access works but can not be accessed by non-vnc and spice to the virtual machines.


How could I set it up?


Thank you.
 
The trick is in the web socket handling.
You need the proxy_wstunnel apache module enabled,

Then besides the normal ProxyPass rules you need an extra rewrite rule set to handle the connection upgrade.
Code:
SSLProxyEngine on

ProxyPass / https://proxmoxhost.example.com:8006/ max=100
ProxyPassReverse / https://proxmoxhost.example.com:8006/

RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "wss://proxmoxhost.example.com:8006/$1" [P,L]
 

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!