Running IIS and Apache on same machine

Oct 4, 2012   //   by Jagan Krishnaraj   //   ASP, ASP.Net, Servers  //  1 Comment

I had been recently migrated from PHP MySQL to ASP.NET. I Installed ASP.Net in my computer which occupied the default port 80 & 443 for local host. So i can’t run the Apache server in my local machine. When i try to install Apache web server using XAMPP i get an error “Port 80 or 443 (SSL) already in use”

I wonder is it possible to run APACHE and IIS on same system. (I.E so that i can simultaneously run PHP MySQL apps and ASP.NET web apps)

After plenty of research through forums i finally got a solution

First you have to make sure that you should have 2 IP address assigned to your PC

Select cmd->type ipconfig

It should show atleast 2 Ip’s assigned to  your pc

You have to configure Apache to listen to specific IP address

Open httpd.conf file from Apache/conf directory and edit the line with ServerName key. This is my new httpd.conffile:

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn’t have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
# Old value: ServerName 127.0.0.1:80
#
ServerName 192.168.1.177:80

Now, restart your Apache web server.

Finally, configure IIS to bind it to another IP address

IIS binding on Vista requires you to update IIS settings and you will need to use command line tool called netsh.Open a command prompt and type netsh.
netsh is only available on Windows Vista or Windows Server 2008 or later and you will need to start command line with elevated settings. Replace my IP address with your system’s IP address. Repeat “add iplisten ###.###.###.###” for all the IP address bind to IIS.

C:\Windows\system32>netsh
netsh>http
netsh http>add iplisten 192.168.1.164
IP address successfully added
netsh http>show iplisten
IP addresses present in the IP listen list:
192.168.1.164

To make IIS listen to a specific port use the syntax: add iplisten 0.0.0.0:XXX. Replace XXXX with the port number, for example, 8080.

Incoming search terms:

Post comment as twitter logo facebook logo
Sort: Newest | Oldest

Trackbacks

  1. Garmin 1490t says:

    Garmin 1490t Best Price…

    [...]the time to read or visit the content or sites we have linked to below the[...]…

Recommend us on Google!
Click to Subscribe

, Chennai, India.
Web development is my Passion
Programmer - Blogger - Creator

I Support Open Source