-   Linux - Newbie (
-   -   DocumentRoot [/etc/httpd/var/www/html] does not exist (

allenlow 11-21-2010 09:52 AM

DocumentRoot [/etc/httpd/var/www/html] does not exist
I am newbie, need ur help:)
I unable to start the httpd service coz i try to configure a subdomain. It prompt the error below:
[root@server conf]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Warning: DocumentRoot [/etc/httpd/var/www/html] does not exist
[ OK ]

How to resolve this problem? I already set DocumentRoot "/var/www/html" and <Directory "/var/www/html>

saagar 11-21-2010 10:17 AM


Make sure you have given the DocumentRoot as "/var/www/html" and NOT "var/www/html". Probably you have missed a slash before var/www/html.

smoker 11-21-2010 10:53 AM

try running

httpd -t
as root.
This performs a syntax check on the httpd.conf.

allenlow 11-21-2010 09:39 PM

saagar...yes..the path is correct as "/var/www/html" ...just no idea why it will exist additional as /etc/httpd/??

smoker, i tried..the result as below..plz help~ :)
httpd -t
Warning: DocumentRoot [/etc/httpd/var/www/html] does not exist
Syntax OK

smoker 11-21-2010 11:10 PM

Are you sure that a line doesn't exist that has /etc/httpd/var/www/html mentioned in it ?
Make sure that your line saying /var/www/html doesn't read ./var/www/html
Notice the dot .

allenlow 11-22-2010 01:01 AM

Below is the path of my httpd.conf file...please advice...thx
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

allenlow 11-22-2010 02:47 AM

Thanks everyone...i found the is due to virtualhost setting...
By the way, how to copy all the details in httpd.conf and paste to txt file for reference?

linuxlover.chaitanya 11-22-2010 03:21 AM

Use grep to remove all the comments and empty lines and redirect it to a file.
Something like this:

grep -v ^$ <file-name> | grep -v ^# >> /path/to/text-file

All times are GMT -5. The time now is 07:34 PM.