I'm trying to host a few services under a few different domain names and need to be running multiple webservers to do it (apache 1.3x and 2.x). If I have a single IP, will nat with FreeBSD 4.9 allow me to separate requests by domain name even if they share an IP? Synopsis: Apache 1.3 - bound to 192.168.5.1 Apache 2.x - bound to 192.168.5.2 natd entries: redirect_port tcp 192.168.5.1:80 www.foobar.com:80 redirect_port tcp 192.168.5.2:80 www.otherfoo.com:80 I've noticed with older versions of FreeBSD that natd will simply resolve the names to the IP and as such it sees the natd entries as follows: redirect_port tcp 192.168.5.1:80 123.123.123.123:80 redirect_port tcp 192.168.5.2:80 123.123.123.123:80 ...it will then use the last entry for a given IP (the 192.168.5.2 entry in this case) which effectively breaks this setup. Is there any way to work around this? Does IPFW2 allow for redirection by name? Thanks! -E-
> I'm trying to host a few services under a few different domain names and> need to be running multiple webservers to do it (apache 1.3x and 2.x). > > If I have a single IP, will nat with FreeBSD 4.9 allow me to separate > requests by domain name even if they share an IP? NAT works with IP addresses. Why can't you just use Virtual Hosts in Apache? Do you really need to run both versions? If so, what you need to do is something like this: Apache 1.3x runs on port 80 Apache 2.x runs on port 8080 redirect 192.168.5.1:80 to 123.123.123.123:80 redirect 192.168.5.2:80 to 123.123.123.123:8080