You have a single incoming IP address and want to run multiple web servers for multiple sites behind this IP address on your local network. The best way to do this is using a reverse proxy server For example:

  • Your External IP is: with and internal LAN of 10.1.1.X
  • Ports 80 (http) and 443 (https) have been forwarded from your external ip to an internal server at which will handle the reverse proxy and SSL/TLS work using letsencrypt
  • You have other application web servers listening on port 80 on your internal LAN at and but these are not accessible from outside your network.
  • You have and both pointed to and you want visitors to them to see the application servers at and respectively.
  • You want to provide secure https access to both subdomains but don’t want to configure this on each of the three servers separately.

This guide is based on using Apache2 on Ubuntu 16.04, some commands may differ slightly between different flavours of Linux but the core configuration for Apache2 should work on any distribution.

Read More →