Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Kevin Jensen on May 13, 2002, 09:34:06 PM
-
Here is the situation:
I have an smeserver running email/dns/firwall/ and I've installed the port forwarding module.
I have two webservers internal. Both windows 2000 boxes.
A: http://www.domain1.com 192.168.90.22
B: http://www.domain2.com 192.168.90.23
Is there any way to route to the appropriate internal IP based on URL? Or do I have to forward all port 80 to one machine?
Any ideas would be appreciative.
Thanks,
Kevin
-
Hi,
so how do you host all your customers :-) ?
Build domain1.com and domain2.com as virtual domains into your e-smith box.
Point www.domain1.com and www.domain2.com in your hosts file to your w2k boxes. Just enter the correct IPs in the server-manager. Add more services as needed.
No port-forwarding needed.
hth
Alex
-
Alex,
Thanks for the quick reply. I have created virtual domains in the server-manager, and pointed them to my internal web servers. Everything works great internally when I do that. But externally, they route to the smeserver information bay instead of the internal webserver. Where is this hosts file your refer too? could this fix my problem?
Thanks again,
Kevin
-
Oops!
Actually i never tried that, but:
First check
http://www.e-smith.org/bboard//read.php?f=1&i=13744&t=13744&v=f
this provides a solution via port-forwarding. But this will probably not work with two different domains.
Here is, what i did:
I use my domain http://www.raziemann.de as virtual domain on my e-smith box.
For some provider-trouble this one is hosted
a) on primary domain e-smith box and
b) on some external providers webspace.
What i did for bandwith-reasons is i went to server manager hostnames and adresses and put the IP of providers webspace in there for www and ftp.
It works like a charm. Perhaps you should then put your w2k-boxes on the outside of your network (if you dare to). Then this will work in every case. But no extra security....
alex
-
You guys could use mod_rewrite with Apache :) You won't be able to port forward based on host header, but you should be able to use mod_rewrite to do what you need to do.
-
You could use Mod_rewrite or create virtual network interfaces for the public
interface of the firewall and assign different public IPs to these virtual
interfaces. Then, you can do a port forwarding on each interface to
redirect the traffic to the actual internal server.
Unfortunately, one cannot create virtual interfaces through the web
interface.
-
proxypass perhaps will help.
look here
http://www.e-smith.org/bboard//read.php?f=1&i=13972&t=13893&v=f
good luck.