How to open port 80 for Apache, previously occupied by Visual Studio's servers? How to open port 80 for Apache, previously occupied by Visual Studio's servers? apache apache

How to open port 80 for Apache, previously occupied by Visual Studio's servers?


You can set the port number in httpd.conf configuration file of Apache server.

Usually inside the "conf" folder of Apache installation folder. (Say, c:\wamp\Apache2\conf\httpd.conf)

Then change the line Listen 80 to Listen 8081. Restart your Apache server.

Tip: You can install IIS and Apache together, and you can work on both at the same time. All what you need is, set different port numbers for Apache and IIS.

By default, both of them use Port 80, but you can change it as said above.

I forgot to mention, when you're using a port number other than 80, you MUST change the browser addressbar as http://localhost:8081/ or http://127.0.0.1:8081/


I found this from superuser.com which one of users posted up , so hope it helps as well. :)To add a rule in the Windows Firewall for port 80, do the following:

Go to the Control Panel and launch "Windows Firewall"Go to "Advanced Settings"Select "Inbound Rules" in the left paneSelect "New Rule" in the right paneIn the New Inbound Rule Wizard, select "Port" as Rule Type, then click on "Next"Select "TCP and put "80" (and any other ports you want to open) in "Specific local ports", then click on "Next"Select "Allow the connection", then click on "Next"Select the network location where the rule should apply (select them all if you're not sure), then click on "Next"Give a name and an optional descriptionThat should do it.


If you installed Visual Studio, you may also have installed SQL Server. I found out that if SQL Server Reporting Services was installed and started, it uses port 80 too which was causing my problem.

Here is what I did to solve the issue:

  1. Press "Windows + R".
  2. Type: services.msc.
  3. Look for Sql Server Reporting Services in the list.
  4. If the Status reads Started, right-click on the line and click on Stop.
  5. Then, right-click on the line again and choose Properties.
  6. In the window that pops, change Startup type to Manual.

You now have stopped SQL Server Reporting Services and prevent the service from starting again on your next computer restart. Note that if you need that service to work, you will need to start it manually.

Now, SQL Server Reporting Services won't cause any problem with WAMP. You should reinstall the Apache service. Here are the steps:

  1. Click on the WAMP icon (orange) and click on Stop All Services.
  2. Click again on the WAMP icon (red) and go to Apache > Service > Install Service.
  3. Click again on the WAMP icon (red) and click on Restart All Services.

The WAMP icon should turn to green and everything will work fine.