Recent Posts

Tuesday, July 28, 2015

Cannot start apache from xampp on windows 7 due to ports blocked (fixed)

In my Windows 7 i had installed .net and so IIS was running and therefore it was normally using up the port 80 and therefore any other trying to work on port 80 was rejected.
I had this issue while I tried to restart Apache server from xampp it was always giving error saying access to the port was denied.

To avoid this issue I had to search the web every time i open up xampp. To fix this problem i have decided to write up this blog post that covers the solution of the issue:

Problems running XAMPP while running IIS. If you are running IIS it might be worth stopping the service then starting XAMPP.

If you just want to make Apache run an don't mind which port it is running on, do the following:

1. In the XAMPP Control Panel, click on the Apache - 'Config' button which is located next to the 'Logs' button.

2. Select 'Apache (httpd.conf)' from the drop down. (notepad should open)

3. Do Ctrl + F to find '80'. Click 'find next' three times and change line Listen 80 to Listen 8080

4. Click 'find next' again a couple times until you see line ServerName localhost:80 change this 
to ServerName localhost:8080

5. Do Ctrl + S to save and then exit notepad.

6. Start up Apache again in the XAMPP Control Panel, Apache should successfully run.

7. Use http://localhost:8080/ in your browser address bar to check everything is working.

Thanks to Afroman in the stackoverflow comment :

Related Posts by Categories

No comments:

Post a Comment