SUSE Support

Here When You Need Us

Apache fails to start with invalid DocumentRoot

This document (7014718) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
 

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.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7014718
  • Creation Date: 08-Mar-2014
  • Modified Date:23-Feb-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.