I have IIS 7 installed on my computer. I installed WAMP on this system but now I am not able to use websites on Apache.

I tried using -

iisreset stop

but that threw an error -

The RPC server is unavailable.

how can I stop IIS 7 so that I can use my websites on Apache?


Using a command line

  1. Open an elevated command-line window.

  2. At the command prompt, type net stop WAS and press ENTER; type Y and then press ENTER to also stop W3SVC.

  3. To restart the Web server, type net start W3SVC and press ENTER to start both WAS and W3SVC.

Source : http://technet.microsoft.com/en-us/library/cc732317(WS.10).aspx

  • I used these commands, but now when I try to access localhost I get a "Unable to connect" error message. – hashpling Dec 20 '10 at 13:35
  • 1
    did you start apache after you used them? this command turns off IIS7, it doesn't start apache. – OneOfOne Dec 20 '10 at 14:22

Unless you have changed the ports the web servers run on you cannot, by default they both run on Port 80.
Head into IIS and change the binding to port 81 instead of 80. This will allow apache to run, whilst attempting to access website via IIS they will need to end with :81

Hope this helps.

  • I have not done this before, could you tell me how to change the port in IIS 7. The OS is Windows server 2008, if that helps. – hashpling Dec 20 '10 at 13:48
  • Here you go: support.microsoft.com/kb/149605 – scampbell Dec 20 '10 at 13:51
  • Well thanks, but that's the problem. I do not have any default website when I open inetmgr. – hashpling Dec 20 '10 at 14:07

You can use XAMPP, very easy to install an let you start your apache as service.

If you are looking for IIS to listen port 80 and apache on port 81, also you have to change apache SSL port, because IIS use 443.

If you want to use both on port 80, you can add to your Windows one virtual IP to the Local Conection, under TCP/IP Properties.

You will use your default static IP for IIS and the apache will use the virtual IP.
Then, add some entries on your c:\windows\system32\drivers\etc\hosts, like:

iis.local 192.168.x.x
apache.local 192.168.x.y

Try to start both services.
Ask me if you have further questions.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.