Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Apache and IIS on same server

Posted on 2004-10-24
3
Medium Priority
?
490 Views
Last Modified: 2010-04-20
Can Apache be run on the same Windows Server as IIS, as I might want to test php files on Apache and asp on IIS?
0
Comment
Question by:ncw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Assisted Solution

by:KerryG
KerryG earned 200 total points
ID: 12395070
Certainly it can but they both cant run on the same port. So where IIS may be on port 80 you may need to set Apache on Port 8000. Or you can just run PHP scripts in IIS, its not that hard to configure.
0
 
LVL 33

Accepted Solution

by:
humeniuk earned 800 total points
ID: 12395410
PHP runs well with IIS, so if that's your primary concern, you can go that route.  The two servers cannot listen to the same port on the same IP, so you can configure them to use different ports as KerryG suggested or you can use two IP addresses and bind IIS to one and Apache to the other.

This is how to do either (from www.faqts.com/knowledge_base/view.phtml/aid/9400):

"IIS and Apache will default to listening on Port 80 (the http port).  IIS will also listen on all IP by default (even if you specify an ip for your http service in the IIS managment console).  Apache will listen on the IP (one or more) you specify in httpd.conf.

But it's not possible for two apps to share the same port for the same IP, which explains your trouble.

You have two solution to this problem depending the number of IP your machine are hosting.


Only one IP

So, you need to change the port of one of the servers.  One can listen on Port 80, the other on Port 8080 (or whatever).

To change IIS to a new port :
- IIS managment console : open the property page for your site (or the default if you wish to change all the site you are hosting) and switch "TCP Port" to an other value.
- Web console : I just clicked through the Web-based config screens until I found the spot for changing the port.  Try it. Restart all the IIS services

To change Apache to a new port :
open httpd.conf and look for two lines, one is "Listen 80" (or listen YourIpAdress:80) and the other is "Port 80".  Change them to a different number, perhaps like this: Port 8080  Listen 8080

Then save the file and restart the server.  Now you can have Apache running and IIS running.  One will run on the default 80 port, so http://www.mysite.com/ should work ("mysite" should be the name of your site, of course).  The other will run on a different port, and will need to be specified, like this: http://www.mysite.com:8080/


More than one IP

Follow these steps
1 - disable the IIS multi address listning (this is the trick - open a console ([start] [execute] cmd ).
At a command prompt, switch to the "C:\InetPub\AdminScripts" folder.
Type the following command:  CSCRIPT ADSUTIL.VBS SET W3SVC/DisableSocketPooling TRUE
exit the console
Restart all the IIS process
IIS is now listening only on the IP you wish !!!!!!!

2 - specify the IP you wish for your IIS sites
Open IIS managment console
open the property page for each of your sites and set the "IP Adress" value.

3 - specify the IP you wish for your Apache
open httpd.conf.
For each of your sites,
- change the ligne   listen YourIpAdress:80.  
- Change the virtualhost sections (if you have more than one site on
your apache - refere to apache docs)

4 - Restart apache and IIS

You ar now hosting multisite on apache and IIS "
0
 
LVL 1

Author Comment

by:ncw
ID: 12451091
Thank you
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question