Two websites on one Win2k server?
September 15, 2008 4:49 PM
Subscribe
Is there a way to run two "virtual" websites on a Windows 2000 server that are accessible to different users by different names?
We have a VB6 application that's based on a SQL Server backend. In addition to the forms within the application that are used to review and change the data, there's also a webserver involved that serves up VBScript pages (mostly reports). This is all done solely on an internal network with a Win2k server running IIS 6. What I'm trying to do is set it up so that two users who are testing will be working against totally independent instances of the database.
The DSN is hard-coded into the application, and (for the sake of this question) can not be changed; the DSN (Application_Data) is obviously configured on each client machine, but is also set at the server for the sake of the ASP pages that need to access the data. The "web address" of the web server is also (for the sake of this question) not changeable -- it's hard-coded into the application as http://application, and we set up an entry in users' HOSTS file mapping "application" to our server address (192.168.0.254).
I've created a second instance of the database in SQL Server (DB1 now has a duplicate, named DB2). I've set up a second DSN on the server (Application2_DSN) which references DB2. I've copied over the web directory to a second directory on the server (wwwroot2), and changed all of the files in it which referenced the old DSN to the new DSN. I then set up a new "Web Site" in IIS pointing to wwwroot2.
It's at this point that I get stuck. What's the final step I need to do so that user A, when they navigate to http://application, go to one IIS "Web Site," while user B would be directed to another "Web Site?"
Our router is set up to direct all incoming port 80 requests originating on our network to the server 192.168.0.254. I've tried setting it up to also forward all port 8080 requests to the same server, and then configuring the second website in IIS to listen on port 8080, and that almost works (going to 192.168.0.254:8080 in a web browser brings up the second "website") but it doesn't entirely work because apparently you can't specify a port number in a HOSTS file (grrr), so I can't modify the entry in the HOSTS file to point to 192.168.0.254:8080 instead of 192.168.0.254.
If I've left out any crucial details, please don't hesitate to ask for clarification.
posted by Doofus Magoo to computers & internet (7 comments total)
posted by MCTDavid at 5:55 PM on September 15, 2008