Forum Moderators: phranque
Background info:
Running IIS (192.168.1.10) and Apache (192.168.1.20) on same win2k server machine. 2 IPs same port 80. Also running on the same machine is a kerio winroute firewall.
I run sites, subdomain xyz.mydomain.com on IIS and subdomain uvw.mydomain.com on Apache.
From within the network, since it goes through the firewall, it looks at the hosts file and redirects the sites to the corresponding IP and everything is perfect.
However from outside, the DNS server on the internet sends the site to my static internet IP. Once it gets in, my router sends it to the webserver at 192.168.1.10. (The router can only send to one IP)
Here comes the question:
How can I get it to send then the subdomain uvw to the 192.168.1.10 IP address?
I tried fooling around in the DNS, creating hosts and sending them to the right IPs. But I don't know if the query gets to the Windows DNS server. How can I find that out? When I do a nslookup on the server it sends back the correct IPs, I just don't think it gets the request to begin.
Thanks a bunch.
At least for reading, if not for answering...LOL
In IIS all web requests are routed through port 80. You can't have two web servers running on the same port (I think).
Internally you can tell the website to route to different ports, but in order to run both apache and IIS I think you will have to include the port in the IP address from outside the firewall, and route it to the appropriate internal address.
[edited by: txbakers at 9:33 pm (utc) on Jan. 23, 2004]
How can I get it to send then the subdomain uvw to the 192.168.1.10 IP address?
Do a wildcard. Have your domain server on the outside send *.mydomain.com to the external address on the router, and then have the router forward all traffic to .10 on the inside.
Set up IIS to use host headers, and let host headers figure it all out. Non HTTP/1.1 clients will get the default website, so make sure your default website is the main one.
The servers are working fine. And actually everything gets to IIS fine, I just need to get a couple subdomains past IIS to continue its trip to the Apache instead of getting the "no website at this Address" message from IIS. Of course there is no site since it is on the Apache server. hehe
From inside the network it works fine, I type whatever subdomain, it gets correctly rerouted to the IIS or Apache for that subdomain. It just doesn't work from theinternet side, and I'm at a loss in finding if the Windows DNS server can solve the problem?
Hmm... There's no easy way of doing what you're trying to do with two different machines.
There are tricky ways of doing something cool with an Apache box and some complex mod-rewrite stuff, but honestly, I think you're better off upgrading the firewall and getting a few more IP addresses.
I just started on the trip with installing Appache alongside IIS. I want to learn the Apache side to latter move to Linux.
But the basic premise was running ASP on IIS and PHP on Apache.
Both are good technologies, both have advantages and disadvantages.
The world is big enough to support both very nicely.
I chose ASP because I have worked with windows servers for a long time and would rather program than adminisister a *NIX server.
But the new sites will most likely be PHP and MySQL based.
Hence the dilemna. Plus learning new things is cool too.