nginx Proxy Manager

Description

Now that we have PiHole set up, we will set up a Reverse Proxy. Using these two services together, we can resolve names like foo.proxmox.box and bar.proxmox.box to IP address and port number combinations, such as https://192.168.100.2:8006.

Once we've got the basics set up, we'll add the ability to use https as well.

Installation

  • Select your node in the Proxmox web UI
  • Select >_ Shell on the ribbon on the details pane to open it in a new window.
  • To create a suitable container, we'll use a community script by a user named tteck.
  • Follow the wizard, and remember to assign a static IP.
  • Once it is done, you can access its Web UI on port 81.

Create a Proxy Host

Once you've logged in to the nginx web UI and set up your username and password, select the Hosts tab then choose Proxy Hosts. On the right of the screen is a button labelled Add Proxy Host.

  • Domain Names: pihole.proxmox.box
    • Note that you need to click the "Add pihole.proxmox.box" list item in the dropdown to make it commit a new name.
  • Scheme: http
  • Forward Hostname / IP: 192.168.100.3
  • Forward Port: 80
  • Click Save
  • Now try navigating to: http://pihole.proxmox.box/admin

Using SSL Certificates

Now that we have a HTTP Proxy Host working, we'll create a TLS/SSL Certificate so we can create HTTPS Proxy Hosts. Head on to the next section.

Once you have your wildcard certificate and private key, we can add it in nginx Proxy Manager.

  • In the nginx Proxy Manager web UI, navigate to the SSL Certificates tab.
  • Click the Add SSL Certificate button in the top right corner and choose Custom in the dropdown menu (don't click the Add SSL Certificate button in the middle of the screen).
  • Enter a name, choose the file for the certificate key, and then the file for the signed certificate

Testing

  • Go back to Proxy Hosts, then edit your existing Proxy Host for pihole.proxmox.box
  • Go to the SSL tab, and select your SSL certificate. Select Force SSL, then save.
  • Now try navigating to https://pihole.proxmox.box/admin
  • It should load without any certificate errors or warnings, and it should show a padlock icon in the address bar.
  • If you add a Proxy Host for the Proxmox web UI, note that you need to redirect to https and not http on the Details tab. If you use http you'll get the "Too Many Redirects" error message.
  • Many services require you to enable Websockets Support, so I'd suggest enabling that when you create new Hosts.

See Also

External Links