Saturday 17 December 2016

Apache failed to start issues and solution



Method 1:
Apache failed to start because of port is already assigned for another services

Solution:

Moved to this location – c:\xampp\apache\conf\http.conf
Locate the following lines

Listen 80
ServerName localhost:80

These two lines change the port 80 to 82

Method 2:
Xampp port 80 is busy

Solution:

Check services.msc if web deployment agent service is running
Check if skype is running, exit from skype
Check if IIS is running, stop it

Method 3:
Apache failed to start because process is already running in LINUX

Solution:

First stop the default apache service in Linux
sudo /etc/init.d/apache2 stop  
Now start the apache services
sudo /opt/lampp/lampp start

OR

# sudo apt-get remove apache2

Method 4:
Apache failed to starting apachectl  (Unable to start apache services)

Solution:

Apache process is not stopped properly so delete the httpd process and logs

/lampp/logs/httpd.pid
/lampp/var/mysql/$(hostname).pid
/lampp/var/proftpd.pid

(Delete those files)

After restart the apache services or forcefully start the services
strace -Ff apachectl start

Method 5:
Apache failed to start because of port is already used.

Solution:

Check the PID using command prompt or terminal

For Windows: netstat -an