Homelab – adding an nginx reverse proxy to the mix

3 minutes

Of nginx tutorials there are many on the web. With my growing Homelab, having added Confluence to the mix, and having nearly eleven virtual machines on my Home Servers, I was simply tired of accessing them all with the port number qualifier.

Moving the DNS provider to Cloudflare (Free) was the first step, but I was interested in setting up an nginx reverse proxy to handle the plethora of VM’s that I now have. SO, here’s how I went about it.

I created a separate VM for the nginx proxy, lean on specs, as it really doesn’t need much. I used

  • 20GB HDD space
  • 2GB RAM
  • 1 CPU

Install Ubuntu & nginx

Install Ubuntu, as always. The requirements from an nginx system are quite lean.

Install nginx from the PPA (as the version in the repository is 1.10)


Forward all 443 and 80 ports from the router, along with other TCP/UDP ports dealing with HTTP traffic to the new nginx server.

Create the first vhost file.

Before enabling SSL

Activate the new vhost in nginix

Do this for every vhost created.

Enabling SSL

LetsEncrypt

Changes to the vhost

IF one has a WordPress blog on the web host, add the following to wp-config.php

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.