LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-02-2013, 03:33 AM   #1
suresh.k
Member
 
Registered: Aug 2011
Location: Hyderabad, AP, India
Distribution: centos, Ubuntu
Posts: 163
Blog Entries: 1

Rep: Reputation: Disabled
Apache server restart issue : Warning: DocumentRoot does not exist


Hi,
I have configured apache server on centos with multiple virtual hosts.
when i restart the apache server it gives error

# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Warning: DocumentRoot [/home/www.mycottageholiday.co.uk] does not exist
[ OK ]

There is no www.mycottageholiday.co.uk virtual host configured in my apache configuration file, May be www.mycottageholiday.co.uk virtualhost configured previously but now it is no more in configuration file

Thanks
suresh
 
Old 01-02-2013, 06:47 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You can search under /etc/httpd/ to see where that directory comes from. E.g:
Code:
find /etc/httpd/ -exec grep "/home/www.mycottageholiday.co.uk" {} /dev/null \;
Regards

Last edited by bathory; 01-02-2013 at 06:57 AM.
 
Old 01-02-2013, 07:52 AM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Quote:
apachectl -S
check what are the virtual hosts have been configured..

Quote:
apachectl -t
confirm any syntax error before start the apache...

I think, This will be a best practice whenever you modify/add some configuration in apache. Confirm the syntax error first and then reload the apache.
 
Old 01-03-2013, 04:43 AM   #4
suresh.k
Member
 
Registered: Aug 2011
Location: Hyderabad, AP, India
Distribution: centos, Ubuntu
Posts: 163

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

You can search under /etc/httpd/ to see where that directory comes from. E.g:
Code:
find /etc/httpd/ -exec grep "/home/www.mycottageholiday.co.uk" {} /dev/null \;
Regards
Fine
got the mycottageholiday virtualhost in /etc/httpd/conf.d/ folder.
Removed it and restarted
Restarted apache without errors


Thanks
Suresh

Last edited by suresh.k; 01-03-2013 at 04:48 AM.
 
  


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
DocumentRoot [/etc/httpd/var/www/html] does not exist allenlow Linux - Newbie 10 07-10-2018 07:59 AM
APACHE2 DocumentRoot does not exist for Vhost Wonderm00n Linux - Software 2 04-09-2010 09:33 PM
Apache server monitor and restart grob115 Linux - Server 3 02-28-2007 12:33 PM
Apache 2 will not Restart on a particular SuSE 9 server. leolson SUSE / openSUSE 2 01-16-2007 04:50 PM
DocumentRoot apache illtbagu Linux - Software 6 02-28-2003 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:40 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