Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache and IIS 7 running together

I am working on windows 7. IIS 7 and XAMPP are installed on the same computer. I have been playing with win host file and apache configuration files into to understand Server Root and directory.

I dont know where i messed up, that know when i type localhost it shows me IIS 7 screen and when localhost/xampp then apache screen.

How can IIS and apache run together at port 80 ? confused.

enter image description here

enter image description here

enter image description here

like image 971
Gainster Avatar asked May 11 '11 00:05

Gainster


People also ask

Can you have Apache and IIS running at the same time?

Simultaneous ServersYou can install Apache and IIS on the same Windows PC at the same time. Although the applications will run, they both listen for web requests on TCP port 80 — there will be clashes so a little configuration is required.

Can we run XAMPP and IIS together?

It is possible to run both IIS and XAMPP servers together on same machine by just changing the port number of any one of the server's. XAMPP-Apache and IIS both the server's uses the same port 80 to connect.

Is Apache and IIS the same?

IIS comes as a package with windows and apache is an open software. While IIS runs only on the windows, Apache can run on different OS. IIS integrates with other Microsoft programs like . Net and ASP scripting language.

Where is httpd conf file in IIS?

config file contains settings for IIS and its services. By default, it is located at %windir%\System32\inetsrv\config\applicationHost. config .


2 Answers

It is doable. The thing to keep in mind is that no 2 services can share the same port and IP address. Unfortunately, IIS takes over port 80 completely on the magic 0.0.0.0 address. What you need to do is re-bind apache and IIS to different IP addresses as well as remove the 0.0.0.0 binding. Not exactly sure how to get there on IIS7 (presuming you are running it given IE9 in the screenies), last time I pulled this stunt IIS6 was hawt.

A more sane option would be to setup a reverse proxy on 80 and have it hand stuff out to different web servers based on whatever rational criteria you want to use.

EDIT: found the magic juju, IIS7 post #44 - IIS7 and Apache on the same machine.

like image 191
Wyatt Barnett Avatar answered Sep 27 '22 22:09

Wyatt Barnett


How To Run IIS And XAMPP Together On Same Machine

It is possible to run both IIS and XAMPP servers together on same machine by just changing the port number of any one of the server's. XAMPP-Apache and IIS both the server's uses the same port 80 to connect. In this post i am going to show you how to change the port number for the XAMPP-Apache server. Changing the port number for Apache server allows you to run both IIS and XAMPP server's on same machine using different port's.

Firstly, You need to know the folder where XAMPP is installed (root folder). The default folder is c:\xampp. From the root folder navigate to " apache\conf " folder and find the file "httpd.conf".

Before editing the file, make a backup of it with a name "httpd.conf.bak" so that if something goes wrong you can replace this file. Now open the file "httpd.conf" with an editor like notepad. You need to make two edits to the file.

The first one:

Find out the below lines in the file.

#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80

change it as shown below:

#Listen 0.0.0.0:80
#Listen [::]:80
Listen 8080

The second edit:

Find the below line:

ServerName localhost:80

change it to:

ServerName localhost:8080

You have finished changing the port number. Now restart your apache server from the xampp control panel and its ready to run.

Open your browser and and enter the address localhost:8080. You can see the root folder of apache opened. There is no need to make any changes to the IIS server and you an access it by just entering the address localhost in your browser.

In the above screenshot you can see the IIS server being accessed through localhost and XAMPP server through localhost:8080 on the same machine and even the same browser at a time.

like image 38
Jeff Brewster Avatar answered Sep 27 '22 23:09

Jeff Brewster