Tuesday, October 13, 2009

how to run iis and apache same machine

Download the apache windows binary installer from http://httpd.apache.org/download.cgi and install. Once installed the apache sever will run automaticllay in tray. It should definately give errors that port 80 is already occupied.

This is because IIS is utilizing port 80. To overcome this problem shut down iis before installation of apache or leave it like it is. However, you have to decide whether you want to use port 80 for iis or apache.

To change apache's default port goto httpd.conf in conf directory of installtion. Open it with editor and change
listen 80 -> listen 8080 (or whatever port you wish)
servername -> localhost:8080

Save and restart apache services.

To change iis port goto iis management console. Select web service, properties and then change default 80 to 8080 (or whatever you wish).

Restart IIS.