LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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: 250Reputation: 250Reputation: 250
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: 250Reputation: 250Reputation: 250
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: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

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.
 
Old 07-09-2018, 08:56 AM   #9
mahendrakumar
LQ Newbie
 
Registered: Apr 2018
Posts: 3

Rep: Reputation: Disabled
Thread: DocumentRoot [/etc/httpd/var/www/html] does not exist

Hai Bro's,

Am also facing the same issue...As per your instruction i was cleared "apr_sockaddr_info_get() failed for server.localdomain" issue.

but still am facing this issue...httpd: Could not reliably determine the server's fully qualified domain name, using server.localdomain for ServerName [Mon Jul 09 19:02:31 2018] [warn] _default_ VirtualHost overlap on port 80, the first has precedence


Please give solution for that..

With Regards,
Mahendra Kumar V

Last edited by mahendrakumar; 07-09-2018 at 08:57 AM.
 
Old 07-09-2018, 05:47 PM   #10
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,733

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Welcome mahendrakumar...

You should start a new thread rather than post an unrelated question on a nearly 10-year-old thread.

That said:
Code:
httpd: Could not reliably determine the server's fully qualified domain name, using server.localdomain for ServerName
is a warning that you've not defined a FQDN to apache
and
Code:
warn] _default_ VirtualHost overlap on port 80, the first has precedence
is a warning that there are duplicate VirtualHost entries in your config file.

Neither should be fatal.

Please review the How To Ask A Question link in my signature, and open a new thread with a better question.
 
1 members found this post helpful.
Old 07-10-2018, 07:59 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,675

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by mahendrakumar View Post
Hai Bro's,
Am also facing the same issue...As per your instruction i was cleared "apr_sockaddr_info_get() failed for server.localdomain" issue. but still am facing this issue...httpd: Could not reliably determine the server's fully qualified domain name, using server.localdomain for ServerName [Mon Jul 09 19:02:31 2018] [warn] _default_ VirtualHost overlap on port 80, the first has precedence Please give solution for that..
As with your other thread (where you never followed up), we aren't your "bros", and as you were told before, you need to read the LQ Rules and the "Question Guidelines" link in my posting signature. You are STILL not providing any useful details about your system, and have re-opened a thread that had been closed for TEN YEARS, and hijacked it with your own question. As scasey said...open a new thread with your question, and when doing so, provide the details mentioned to you previously.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 AM.

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
Open Source Consulting | Domain Registration