- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 'DocumentRoot must be a directory' display when Ap...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 02:56 AM
тАО11-20-2004 02:56 AM
'DocumentRoot must be a directory' display when Apache start
When I start the Apache , it is ok. I can see the web site by http://192.168.1.2
So, I hope to change the location to my web which is /data/web/lyt. However, it display "DocumentRoot must be a directory" . It is a directory obviously. There are a lot of files in /data/web/lyt. It is the first time that I install this version Apache. Do Anyone know why ? I had set the 755 with the file rights. I do not know why it say that it is not a directory.
I had tried DocumentRoot /data/web/lyt
and "DocumentRoot /data/web/lyt" . Same problem .
ref:============================================
# cd /opt/hpws/apache/bin
# ./apachectl start
Syntax error on line 304 of /opt/hpws/apache/conf/httpd.conf:
DocumentRoot must be a directory
#
# DocumentRoot "/opt/hpws/apache/htdocs"
DocumentRoot /data/web/lyt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 02:58 AM
тАО11-20-2004 02:58 AM
Re: 'DocumentRoot must be a directory' display when Apache start
DocumentRoot /data/web/lyt
and
DocumentRoot "/data/web/lyt" . Same problem .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 03:02 AM
тАО11-20-2004 03:02 AM
Re: 'DocumentRoot must be a directory' display when Apache start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 05:08 AM
тАО11-20-2004 05:08 AM
Re: 'DocumentRoot must be a directory' display when Apache start
Can you do a 'cd /data/web/lyt' as the owner of the httpd processes (for ex., www).
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 07:17 AM
тАО11-20-2004 07:17 AM
Re: 'DocumentRoot must be a directory' display when Apache start
it sounds like /data/web/lyt isn't of type diretory or like Sri said check the path down whether it is accessable.
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 07:24 AM
тАО11-20-2004 07:24 AM
Re: 'DocumentRoot must be a directory' display when Apache start
I have noticed something else. The lines are delimited by cr+lf. Did this happen while you transferred the file to itrc or does the original file on your machine have this too?
Check with vi to see if there are ^M at the end of the lines.
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 11:27 AM
тАО11-20-2004 11:27 AM
Re: 'DocumentRoot must be a directory' display when Apache start
The error would be different if the http.conf file were on the apche server like it appears here.
The DocumentRoot directory must be accessible to the user that owns the apache binaries.
There could be a soft or hard link that is bothering apache as well, involving that directory.
Just for grins try another dirctory, restart apache and see what it says.
Note also,that apache will not work right if its scoreboard file is not local disk. All kinds of wild things will happen if you try and locate that file on nfs or samba shares.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 11:59 AM
тАО11-20-2004 11:59 AM
Re: 'DocumentRoot must be a directory' display when Apache start
q1. I am stupid on UNIX. Can anyone tell me what is the command to remove all the files and subdirectories in a path ? I Cannot do it by "rmdir /data/web/lyt"
q2. Can you tell tell what is the file and lines which control the default open file rights. I do not want to be 777. I hope to create 755.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 12:33 PM
тАО11-20-2004 12:33 PM
Re: 'DocumentRoot must be a directory' display when Apache start
Find the answers.
1. I am stupid on UNIX. Can anyone tell me what is the command to remove all the files and subdirectories in a path ? I Cannot do it by "rmdir /data/web/lyt"
A. 'rm -rf /data/web/lyt'. If there are files under the directory, you will have to remove them before you use 'rmdir'. However, I suggest you move the directory and delete it later. 'mv /data/web/lyt /data/web/lyt.old'.
q2. Can you tell tell what is the file and lines which control the default open file rights. I do not want to be 777. I hope to create 755.
A. It depends on what user you are using for. Usually it's 'www'. You can make it even 700 (Good practice) as long all the files are owned by www as that's how httpd processes run and access the files. Otherwise, make it 755.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2004 03:33 PM
тАО11-20-2004 03:33 PM
Re: 'DocumentRoot must be a directory' display when Apache start
apache can own the binaries.
Depends on where you got apache.
I have the depot version of apache prepared for hpux by HP.
user is www
group is nobody
Apache is shipped less secure in Linux or by download from the website.
Try the commands Sri gave you to clear the directory or pick a new one.
umask can set default permissions for a user. in /etc/profile or .profile
Didnn't see that in Sri's answer. I must be sleepy.
Good Luck.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2004 12:38 PM
тАО11-21-2004 12:38 PM
Re: 'DocumentRoot must be a directory' display when Apache start
Regarding the command rmdir: If you have trouble with a unix command, look up the man page. Near the bottom of a man page, you will be referred to other commands that have similar functionality, like rm. I think you were wanting rmdir to do what rm -R will do. However, rm -R can be a dangerous command if used carelessly.
Sam McKnight