0

I reinstall xampp and since then it do problem
now sudenly it stop to work
the apache is running
but when I try to run localhost via broswer I get:

ERR_CONNECTION_REFUSED

What's the problem and how can I fix it?

SOLVED Because I change the port to 8080 berfore that I need to enter via localhost:8080 now its working great. thanks all

sdfds dffdsf
  • 51
  • 1
  • 6

1 Answers1

0

There are duplicates to your question on stackoverflow. An answer i found is...

Apache is not running from XAMPP Control Panel ( Error: Apache shutdown unexpectedly. This may be due to a blocked port)

There are many possible answers for this problem. The most common and most likely is that you're running another program which is blocking port 80 or 443. If you've installed Skype, then you've found your problem! Change apache's port settings to 81 and apache will work. There's a good tutorial on that To check this you can open up your command line by clicking the start menu, and typing 'cmd', and enter the command

netstat -nab

this wil return a list of programs that will vaguely resemble this pattern

[someprogram.exe]
UDP     [fe80::numbers:numbers:numbers:numbers%numbers]:portnumber

You need to find a line (or lines) ending in :80 and terminate them in order to start apache. If there is no line ending in :80, there are more things you can do.

First, navigate to xampp's directory (default is c:\xampp) and double click apache_start.bat. This will open up a comand line and return more detailed errors about why apache can't run. Mostly, be looking for syntax errors that you could've created by editing your httpd.conf, or httpd-ssl.conf files. This is very easy to do if you've edited it and are a new user.

If still this fails, your last hope is to check the apache error log by clicking on the logs tab in apache's row in the xampp control panel and clicking error log.

If none of this works, don't give up! You got this!

Edit: If you change the port of apache, you will also have to go into httpd.conf (located in xampp/apache/conf) and near line 184, replace

ServerName localhost:80

with

ServerName localhost:81

It is also possible to specify port 81 in the url of your localhost, i.e.

localhost:81/my_project.php

Community
  • 1
  • 1
Bizmate
  • 1,718
  • 1
  • 14
  • 18
  • Hey this is not my problem, I already change the ports to 8080 before that, now the apache is running but not work, you understand? – sdfds dffdsf Jan 24 '16 at 15:03
  • You didnt write the change of port on your question. Please be specific and provide all details – Bizmate Jan 24 '16 at 15:08