Help - Search - Members - Calendar
Full Version: Warning: DocumentRoot [/dev/null] does not exist
The Planet Forums > Control Panels > cPanel/WHM
claven177
I want to restart httpd

I ran httpd restart, but got an error message.

Warning: DocumentRoot [/dev/null] does not exist

How to fix it ?
Tomy Durden
Check /etc/httpd/conf/httpd.conf or one of the config files in /etc/httpd/conf.d/ for a DocumentRoot declaration and adjust it to the directory where your pages and other http files are.

On most systems, it's:
CODE
DocumentRoot /var/www/html


More info can be found at http://httpd.apache.org/docs/1.3/mod/core.html#documentroot
QUOTE
DocumentRoot directive
Syntax: DocumentRoot directory-path
Default: DocumentRoot /usr/local/apache/htdocs
Context: server config, virtual host
Status: core

This directive sets the directory from which httpd will serve files. Unless matched by a directive like Alias, the server appends the path from the requested URL to the document root to make the path to the document. Example:

DocumentRoot /usr/web

then an access to http://www.my.host.com/index.html refers to /usr/web/index.html.

There appears to be a bug in mod_dir which causes problems when the DocumentRoot has a trailing slash (i.e., "DocumentRoot /usr/web/") so please avoid that.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.