Apache fails to start with invalid DocumentRoot

  • 7014718
  • 08-Mar-2014
  • 08-Mar-2014

Environment

SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
Novell Open Enterprise Server 11 (OES 11) Linux
Novell Open Enterprise Server 2 (OES 2) Linux

Situation

The apache2 web service fails to start at boot time. The following errors are found in supportconfig boot.txt or /var/log/boot.msg:

"Starting httpd2 (prefork) Syntax error on line 6 of /etc/apache2/default-server.conf:
DocumentRoot must be a directory
The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
failed"


The rpm -V apache2 validation output in the supportconfig web.txt shows:

S.5....T  c /etc/apache2/default-server.conf

This indicates the size, md5sum and time stamp have all changed since /etc/apache2/default-server.conf was installed. The /etc/apache2/default-server.conf in the supportconfig web.txt file shows the following configuration:

DocumentRoot "/srv/www/htdoc"
<Directory "/srv/www/htdocs">


Resolution

Change the /etc/apache2/default-server.conf file's DocumentRoot value to match the Directory tag and a valid directory on the filesystem.

1. Edit /etc/apache2/default-server.conf
2. Change DocumentRoot "/srv/www/htdoc" to DocumentRoot "/srv/www/htdocs"
3. Save and exit
4. Run /etc/init.d/apache2 restart to validate the fix worked and start the web server


Cause

There was an incorrect DocumentRoot value in /etc/apache2/default-server.conf. It must point to a valid directory on the filesystem.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.