Apache and IIS on the same machine

Posted on 2003-03-05
Medium Priority
Last Modified: 2010-04-20

I am trying to run Apache and IIS on my home PC, so I can use Apache to run my PHP scripts and IIS to run my ASP scripts. This purely for my own development use.

I installed IIS first and then Apache. They are both using the same port 80. They seem to work ok-ish, but ive noticed a problem that when I have stopped IIS and started Apache as a service, then i load IE and type in http://localhost it says "Forbidden, Permission denied" but when i enter in a filename with the .php extension it runs that file fine. it just doesnt accept the http://localhost url.

With IIS running, I type in http://localhost into IE and it displays the correct Microsoft IIS info. Now I know from previous experience that with Apache running when localhost is typed in it should display the Apache server info page - this is not the case.

Now Im not sure if this will cause me problems in the future which is why I want to ask if anyone has both IIS and Apache successfully set-up on their machines!?

Hope someone can help
Question by:janevok
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

Accepted Solution

hawkers earned 120 total points
ID: 8071396
Hi janevok

Regarding the problems you have with IIS and Apache, I think it is all because you are using the same port number for both services. I recommend that use 80 for 1 webserver and 81, or 8080 or something else for the other web server.

You can change this in the IIS admin console or editting the httpd.conf file in the your APACHEINSTALLDIR/conf/httpd.conf and find the Port Number configuration parameter.

You will have to restart each web server, or even reboot your machine to ensure that your web apps work correctly.

Regarding the localhost problem, this refers to the loopback IP address which is fixed to so if you use the same port number for web server and you are accessing the web server on your via the browser, you will sure to have confliction issues.

So when you change your port number you can access your webapp as follows or http://localhost:80/youraspwebapp (for IIS) http://localhost:81/youraspwebapp  (8080)(for Apache)

Or visa-versa depending on how you want to configure your web servers.

I hope this helps


Expert Comment

ID: 8153243
apache also has a configuration to allow directory browsing.. search the httpd.conf file for it

Featured Post

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 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