# LOCAL/VPN PROXMOX
<VirtualHost *:443>
ServerName domain.com
<Location />
# ALLOWED IP/SUBNETS
Require ip 192.168.1.0/24
Require ip 10.10.0.0/24
</Location>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ServerAlias proxmox.domain.com
RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
SSLEngine On
SSLProxyEngine On
SSLCertificateFile /path/to/certificate/domain.com.cer
SSLCertificateKeyFile /path/to/key/domain.com.key
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyRequests Off
ProxyPreserveHost On
<Location />
ProxyPass https://192.168.1.100:8006/
ProxyPassReverse https://192.168.1.100:8006/
</Location>
<LocationMatch ^/(api2/json/nodes/[^\/]+/[^\/]+/[^\/]+/vncwebsocket.*)$>
ProxyPass wss://192.168.1.100:8006/$1 retry=0
</LocationMatch>
<Location /websockify>
ProxyPass ws://192.168.1.100:8006
ProxyPassReverse ws://192.168.1.100:8006
</Location>
</VirtualHost>