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?
-
Are you wanting to run two web servers or run two websites on the same web server?– Jake WilsonNov 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 WillsNov 10, 2011 at 18:02
Add a comment
|
2 Answers
- 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.