Apache failed to start

Created:

2016-11-16 13:22:54 UTC

Modified:

2017-08-16 16:25:44 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Apache failed to start

Applicable to:

  • Plesk 11.x for Linux

Symptoms

Unable to reconfigure web server:

# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
2016-07-06T13:37:16-04:00 ERR (3): Apache config (14678266330.68106800) generation failed: Can not restart web server: Service /etc/init.d/httpd failed to start
Service /etc/init.d/httpd failed to start

2016-07-06T13:37:16-04:00 ERR (3): Administrator notification failed: mail() failed: Validation failed for: John Doe <""@"">
Can not restart web server: Service /etc/init.d/httpd failed to start
Service /etc/init.d/httpd failed to start

Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => example.com
)

Details: Empty error message from utility.

Information messages in /var/log/httpd/error_log :

[Wed Jul 06 15:27:07 2016] [info] Init: Seeding PRNG with 256 bytes of entropy
[Wed Jul 06 15:27:07 2016] [info] Init: Initializing (virtual) servers for SSL

Cause

/etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/ssl.conf configuration files got corrupted.

Resolution

Extract default configuration files from .rpm package file and replace corrupted files with default ones as follows, for a example for Plesk 11.0, Centos 6 64-bit:

  1. Find exact package which is installed and owns configuration file:

    # rpm -qf /etc/httpd/conf/httpd.conf
    httpd-2.2.15-54.el6.centos.x86_64
  2. Create directory to extract package into:

    # mkdir /root/httpd_conf_rpm
    # cd /root/httpd_conf_rpm
  3. Find and download such package:

     # wget http://mirror.centos.org/centos/6/updates/x86_64/Packages/httpd-2.2.15-54.el6.centos.x86_64.rpm
  4. Extract configuration file from the package:

    #  rpm2cpio httpd-2.2.15-54.el6.centos.x86_64.rpm | cpio -iv --make-directories ./etc/httpd/conf/httpd.conf
  5. Backup original configuration file and replace it with extracted one:

    # cp /etc/httpd/conf/httpd.conf{,.saved}
    # cp /root/httpd_conf_rpm/etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf
  6. Perform steps 1-5 for /etc/httpd/conf.d/ssl.conf configuration files

  7. Rebuild Apache configuration files:
    # /usr/local/psa/admin/bin/httpdmng --reconfigure-all
Have more questions? Submit a request
Please sign in to leave a comment.