Can WAMP and IIS Co-exist for localhost on XP Pro?

For my development environment, I run PHP / MySQL on WAMP from http://www.wampserver.com/en/ . Now I also need to test some ASP active server pages on localhost.
    Rather than trying something like www.apache-asp.org or Chili!Soft ASP , I think it would be preferable to enable the MS IIS 5.1 that is built in to XP Pro.
   But I don't see how WAMP and IIS can co-exist, as they would both try to be "localhost."  I assume I would have to switch from one to the other as needed?  (If so, I know how to stop the WAMP services; can XP Pro IIS be stopped and started as easily?)
Randall-BAsked:
Who is Participating?
 
petterskCommented:
Yes, there is no problem letting two or more HTTP servers coexist. Both or all can serve pages on localhost as long as they dont use the same ports. Standard HTTP use port 80 and only one of the HTTP servers can serve pages on this. Both IIS and Apache could easly be reconfigured to use whichever ports you would like them to. IIS is reconfigured through the MMC (Microsoft Management Console) and for a default installation of IIS you would change the properties of the "default website" to use another port than 80. Valid port numbers must not conflict with other type of TCP based services. Ports just for testing could be 81,82.... The best option would be to put the serving port on a port above 1024 as this is not used by standard TCP services - often 1080 is used as an alternative for HTTP.

To access pages on a webserver serving on port 1080 you would have to use a url with :1080 appended to the URL like this:

      http://localhost:1080

         or

     http://localhost:1080/something/other/mypage.htm

If there is any problem with having the webservers on different ports you do have the option on setting each webserver to serve different IP-addresses on the same computer. You would need to configure your computer with more IP-addresses - I would think this solution is a bit overkill and much more timeconsuming to be practical.

I have done both solutions a number of times during the last 12 years and specifically with IIS and Apache.

Good luck - anything unclear?

best regards - PetterSk



0
 
Randall-BAuthor Commented:
PetterSK,
   Thanks for the great information.  Assuming I go into the control panel of XP Pro and enable IIS, and also configure it to use a port like 81 or 82 (instead of 1080), would I still have to use the port in the URL like http://localhost:81 ?  I would like to avoid adding the port number to the URL, if possible.  But if the port is not specified, can the two servers know which one should process ASP versus PHP pages?
0
 
petterskCommented:
Yes - you would need to use the port number in the URL for the server not using standard port 80.

If you need to have both servers to serve on port 80 you will need to have each server on a different IP-address. You could do that in a number of ways:

a) Possibly you already have more than one network card in your computer - what about wireless?
If you do you could let each webserver only serve the IP-address of different network cards. Both
network cards need to be operational with a valid IP though connected to a network.

Your first server would then serve: http://localhost and your second server would server http://192.168.168.1 or if you put an extra line in your "hosts" file which resides in your c:\windows\system32\drivers\etc\ - you could give it a name like www.acme.local and it would serve it on the URL http://www.acme.local

b) You could install an additional network card in your computer - and do the same as in a)

c) If you only have one network card you could turn off DHCP and configure two different IP addresses for the single card and you could do the same as described in a) for the rest.

0
 
Randall-BAuthor Commented:
OK, I'll probably go with the http://localhost:1080 method.  If I run into trouble, I'll post another question.  Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.