I’ve got a machine running VisualSVN Server for SCM and IIS which hosts a web front end to perform some repository management tasks. Ideally, I’d like to bind a different domain name to each but it seems I can’t do this without specifying a port on at least one of the names. For all intents and purposes it looks like you can’t run two web servers on the one machine and have port 80 requests go to each even if the requests are to different domain names. Is this the case or is there a way around this? I’m reluctant to end up putting a port number in one of them as it’s not particularly user friendly.
Is it possible to bind domain names to VisualSVN server and IIS on the one box without using a port?
3 Answers
You can run VisualSVN Server and IIS side-by-side on the same port using multiple IP address on network interfaces: http://www.itsyourip.com/networking/how-to-add-multiple-ip-address-in-windows-2000xp2003/
To configure VisualSVN Server bind to only specific interfaces use the following steps:
- Run VisualSVN Server Manager
- Right click on root element and choose Properties
- Switch to Network tab
- Select "These IP addresses" radio button
- Click Add Enter IP address of interface to listen
- Click OK to close Add interface dialog
- Click OK to close Properties window
To configure IIS listen on specific interface use the following steps:
- Start elevated command prompt
Execute following command:
netsh http add iplisten ipaddress=IPADDRESS
- 379
- 3
- 9
- 1,806
- 14
- 15
-
2I've recently used a solution similar to the one proposed here and it does work. – Tim Long Sep 07 '09 at 11:10
An alternative, if you have the right type of application layer firewall/proxy server that is capable of URL rewriting, then you can keep all your backend services on uniqie ports and publish them through the firewall/proxy all on port 80 but with different URLs.
Microsoft's ISA Server, for example, is capable of doing just that. ISA server can crack open an incoming request, examine the URL and, based on the URL it finds, redirect the request to a completely different URL and/or port. This makes for a very secure configuration because the back-end server only ever talks to the firewall, there is never any direct traffic.
In this scenario, users would direct requests to the firewall/proxy server and never directly to teh actual back-end server.
ISA Server is a standard component of Small Business Server 2003 Premiun Edition, although it has been retired for the 2008 version.
This technique can work and I have several backend IIS servers published using this exact technique, however I have found with Apache-based solutions running on the same system as IIS, it makes for simpler management to use multiple IP addresses and have each of the systems use completely seperate IP addresses, as has been suggested in a previous answer.
- 1,728
- 1
- 20
- 41
You will always have to use two ports if you have to competing services, but what you can do however is mask the 2nd port so that it appears to be normal.
You do this with a Reverse Proxy. Basically you tell the web host running on :80 to forward all requests on /SVN/
to http://localhost:81
(or in your case, everything on www.example.com
).
In IIS 6 we use Helicon ISAPI Re-Write. IIS7 might have this functionality built in, I've never checked.
- 68,316
- 31
- 175
- 255