There’s a page on the Proxmox wiki that describes setting up an nginx reverse proxy on the host to forward requests from port 443 to the default HTTPS port (8006). However, this is unnecessary. It can just as easily be accomplished without installing any packages.
Since Proxmox runs on systemd, you can use the built in port forwarding functionality that systemd provides. Log in to the server as root and create two files. The first is /etc/systemd/system/https-redirect.service
:
1
2
3
4
5
6
7
8
9
10
[Unit]
Description=HTTPS redirect
Requires=network.target
After=network.target
[Service]
ExecStart=/usr/lib/systemd/systemd-socket-proxyd 127.0.0.1:8006
[Install]
WantedBy=multi-user.target
Then, create /etc/systemd/system/https-redirect.socket
:
1
2
3
4
5
[Socket]
ListenStream=0.0.0.0:443
[Install]
WantedBy=sockets.target
Then, reload daemons and enable them both:
1
2
3
systemctl daemon-reload
systemctl enable --now https-redirect.socket
systemctl enable --now https-redirect.service