0

I am running a web server and now I want to be able to use another device that also requires port 80, but I only have a single IP. My web server is Ubuntu and uses Apache. Is there a trick to reroute requests to a certain internal IP based on a domain name? How would I do that?

2
  • Are you wanting to run two web servers or run two websites on the same web server? Nov 10, 2011 at 17:59
  • Two "servers". I have one of those NAS devices that require port 80 to be forwarded to it. I am already running multiple web sites.
    – Mike Wills
    Nov 10, 2011 at 18:02

2 Answers 2

5

You'll need to use mod_proxy as a reverse proxy for this.

2
  • create apache namevirtualhosts and forward one virtualhost traffic to the internal IP address with mod_proxy (ProxyPass or RewriteRule [P] )

or

  • use iptables DNAT to forward all requests coming to port 81 towards internal IP port 80.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .