Recent Posts

Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Sunday, August 2, 2015

XAMPP Error - Apache shutdown unexpectedly - This may be due to a blocked port (Solved)

I was having the problem restarting Apache using XAMPP in Windows 7. Every-time I start Apache there was an error popping up. I had a solution to change the port to 8080 but that was not what i was looking for i was looking for solution that should work without changing anything in the config and work as normal.

Following was the error appearing in my XAMPP:
Error: Apache shutdown unexpectedly.
8:33:18 PM  [Apache] This may be due to a blocked port, missing dependencies, 
8:33:18 PM  [Apache] improper privileges, a crash, or a shutdown by another method.
8:33:18 PM  [Apache] Press the Logs button to view error logs and check
8:33:18 PM  [Apache] the Windows Event Viewer for more clues
8:33:18 PM  [Apache] If you need more help, copy and post this
8:33:18 PM  [Apache] entire log window on the forums
So I was looking for the solution all over the place and finally i figured it out.

  1.  Figure out what applications are using port 80 and if there are not crucial applications that are using port 80 then you can free the port for XAMPP to use it. 
    • First open cmd as Administrator -- do this by typing cmd in search bar and right click cmd.exe and run as Administrator
    • Enter netstat -aon | findstr :80 to find all the necessary applications that are using port 80.
  2. Now to free up the port 80 type in : net stop http 
  3. It will ask permission to stop the applications that are using up port 80, Just type Yes 
  4. Now run Apache in XAMPP -- this should solve the problem and now Apache is up and running...
Important: Skype uses port 80 by default, you can change this in skype options > advanced > connection - and uncheck "use port 80"

Reference: 


Read more!

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 : http://stackoverflow.com/questions/14245474/apache-wont-run-in-xampp


Read more!