I have several services running on my home Ubuntu server, which have HTTP web interfaces for configuration. Naturally, each is accessed using the machine hostname and a different port number, such as http://media-server:9981
.
Since these port numbers are difficult to remember (I currently use suggestions from my browser's history to access them) is there a method I can use to access them all using port 80, but with a different DNS name for each, such as http://tvheadend
?
A simple command line application, or IP table configuration, if possible, would be perfect. Note that I would only need this to work on my local network, not over the internet.
Yes.
You can do it two ways: you can add multiple IP's to the interface, and make them listen to their own IP only. This is kinda ugly, but it works.
The other way is to set up a reverse proxy that understands the name the client sends. Apache can do this, using mod_proxy. This is a better setup IMHO, as it scales better, and even works from the internet when ports are forwarded.
You can probably use varnish, squid or nginx also, but I don't know these...
https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension will provide you with a good starting point.