2 (Web) Servers on 1 PC


  1. Posts : 3
    Windows Vista/7RC
       #1

    2 (Web) Servers on 1 PC


    can i setup 2 servers to use 2 different Loopback IPs?

    eg
    127.0.0.1 IIS7.5
    127.0.0.2 Apache

    something like that? this is so that i can specify in the hosts file something like

    127.0.0.1 iis
    127.0.0.2 apache

    i cant do something like ... cant specify ports in hosts file ...

    127.0.0.1:80 iis
    127.0.0.1:81 apache
      My Computer


  2. Posts : 805
    XP Pro SP3 x86/Vista SP2 x64/Win7 x64 Triple-boot
       #2

    Yeah sure you can...

    2 (Web) Servers on 1 PC-serversgonemad.jpg


    I'm not sure why you would want to though. Twice the resources, twice the risks, twice the amount of things to go wrong... I could go on but I won't. :)

    Don't know the in's & out's of IIS but with Apache you could just use one server and setup a virtual host on port 81 in the vhosts config file as well as the default document root on port 80. Like so...
    Code:
        <VirtualHost *:81>
        DocumentRoot "c:/server/site2"
        ServerName www.site2.com
        </VirtualHost>
    Theres no need to edit the windows host file at all aswell for this. If you want both sites 'live' don't forget to port forward if your machine sits behind a router, and dont forget your firewall exceptions.

    Hope this helps somewhat!
    Last edited by Generator; 07 Jun 2009 at 03:13.
      My Computer


  3. Posts : 3
    Windows Vista/7RC
    Thread Starter
       #3

    hmm the reason why i want that is just for testing ... and i sometimes feel like trying out ASP.NET MVC apart from just PHP
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:14.
Find Us