I can't get my head around the following situation. We have an outside-available web site (say, http://example.com
). It runs on our Windows 2008 server in IIS7. Now I want to make one of our internal servers available to the outside world as well (http://dev.example.com
). I've set up DNS entries so that dev.example.com
points to the same IP as example.com
does, but I'm not sure how to configure web servers correctly.
This dev
server hosts, among other things, an OpenID server (which, I think, can cause some serious problems when web servers are incorrectly configured), bug tracker and a Subversion repository. This whole slew of applications runs inside Tomcat 6 which is, to my limted knowledge, is not a web server per se. I know that it can talk to Apache and I'll install it if it's really needed.
The question is: how do I set up IIS/Tomcat/DNS/whatever so that the configuration I just described will work seamlessly.
What you really need is to reverse proxy to your tomcat server. As far as I'm aware, it's a plugin that you need to install for IIS (see http://code.msdn.microsoft.com/urlrewriter)
FYI, had your external web-server been Apache, the feature is built in and EASILY configured.
Also, Tomcat does work as a web-server (how else would it serve web pages?), so you wont need to install Apache on your internal systems.
The deal is as follows. First, a DNS record for
dev.example.com
is required. It should point (in my case) to the same IP asexample.com
does. Next, install Tomcat Connector as described here and you'll be all fine and dandy.Use Host headers, put the host header dev.example.com in for the dev website. DNS points traffic to the IIS (IP address/Port 80) and then IIS points the traffic to the subdomain.