Reverse Proxy Proxmox with Apache
Category : How-to
The Proxmox web GUI is accessible on port 8006 by default using SSL encryption. The web GUI is served by the built in Proxmox lightweight HTTP server however changing the config could cause issues when upgrading to future Proxmox releases. The easiest way to expose the Proxmox web GUI externally is to use Apache to reverse proxy the site. You can then add additional security or specify SSL certificates at the proxy level without interfering with the Proxmox installation.
See my blog post on the basics of using Apache to reverse proxy websites.
To setup the reverse proxy for Proxmox, create a new sites-available entry called proxmox.
vi /etc/apache2/sites-available/proxmox
Add the following to the file and substitute a few settings for your own environment:
- proxmox.cer – change to your SSL certificate for Proxmox
- proxmox.key – change to the SSL certificate key for Proxmox.
- proxmox.host – appears in the Location tags and must be the IP address or resolvable hostname of your internal Proxmox server. The ServerAdmin attribute is an email address which will be displayed on error pages such as 404.
- proxmox.jamescoyle.net – change this to the external URL which will be used to access the reverse proxy server. The server will only proxy requests which contain this URL.
SSLEngine On SSLCertificateFile /etc/apache2/ssl/proxmox.cer SSLCertificateKeyFile /etc/apache2/ssl/proxmox.key SSLProxyEngine on SSLProxyVerify none ServerAdmin [email protected] DocumentRoot /var/www ServerName proxmox.jamescoyle.net # Possible values include: debug, info, notice, warn, error, crit,alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/proxmox-access.log combined ErrorLog ${APACHE_LOG_DIR}/proxmox-error.log ProxyRequests off ProxyPreserveHost on RequestHeader unset Accept-Encoding ProxyPass https://proxmox.host:8006/ ProxyPassReverse https://proxmox.host:8006/ Order allow,deny Allow from all
Enable the new site in Apache. In Ubuntu the command a2ensite will create the symlink, or you can create it manually.
a2ensite proxmox
Reload Apache to load the new configuration.
service apache2 reload