LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-21-2010, 09:52 AM   #1
allenlow
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Rep: Reputation: 0
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>
 
Old 11-21-2010, 10:17 AM   #2
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
AllenLow,

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.
 
Old 11-21-2010, 10:53 AM   #3
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
try running
Code:
httpd -t
as root.
This performs a syntax check on the httpd.conf.
 
Old 11-21-2010, 09:39 PM   #4
allenlow
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
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
 
Old 11-21-2010, 11:10 PM   #5
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
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 .
 
Old 11-22-2010, 01:01 AM   #6
allenlow
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Below is the path of my httpd.conf file...please advice...thx
---------------------------
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
---------------------------
 
Old 11-22-2010, 02:47 AM   #7
allenlow
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks everyone...i found the problem..it is due to virtualhost setting...
By the way, how to copy all the details in httpd.conf and paste to txt file for reference?
 
Old 11-22-2010, 03:21 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Use grep to remove all the comments and empty lines and redirect it to a file.
Something like this:
Code:
grep -v ^$ <file-name> | grep -v ^# >> /path/to/text-file

Last edited by linuxlover.chaitanya; 11-22-2010 at 03:23 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding index.html to /var/www/html not working dannyboy990 Linux - Newbie 1 09-30-2007 08:43 AM
index.html is not noticed in /var/www/html xviddivxoggmp3 Red Hat 1 04-23-2006 06:30 PM
File does not exist: /var/www/favicon.ico matarodi Debian 4 01-26-2006 06:53 PM
help in /var/www/html/!! chidomen Linux - Newbie 4 01-13-2005 11:02 AM
httpd.conf /var/www/html all deined!! adamuk Red Hat 2 03-09-2004 04:35 PM


All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration