LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-05-2004, 09:43 AM   #1
Wonderm00n
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Rep: Reputation: 0
APACHE2 DocumentRoot does not exist for Vhost


I there...

I'm getting crazy with a problem with Apache2...

I've created an vhost:
<VirtualHost 192.168.0.3:80>
ServerName dev.xxxxx.org
DocumentRoot /home/dev/public_html
ErrorLog /home/dev/logs/error_log
CustomLog /home/dev/logs/access_log common
ScriptAlias /cgi-bin/ /home/dev/cgi-bin/
<Directory /home/dev/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
</Directory>
SuexecUserGroup dev dev
</VirtualHost>

When starting apache I get:
[root@wd-linux-1 /]# /etc/rc.d/init.d/httpd start
Starting httpd: Warning: DocumentRoot [/home/dev/public_html] does not exist
[FAILED]

The curious is that /home/dev/public_html indeed exists, and with correct
permissions (i think), as you can see:
[root@wd-linux-1 /]# ls -la | grep home
drwxr-xr-x 4 root root 4096 Dec 5 11:57 home
[root@wd-linux-1 /]# cd home
[root@wd-linux-1 home]# ls -la | grep dev
drwxr-xr-x 8 dev dev 4096 Dec 5 11:20 dev
[root@wd-linux-1 home]# cd dev
[root@wd-linux-1 dev]# ls -la | grep public_html
drwxr-xr-x 2 dev dev 4096 Dec 5 11:23 public_html
[root@wd-linux-1 dev]# cd public_html
[root@wd-linux-1 public_html]# pwd
/home/dev/public_html


Also I got an error in /var/log/httpd/error_log:
(13)Permission denied: httpd: could not open error log file
/home/dev/logs/error_log.
Unable to open logs


If I comment out the error_log and access_log files in this vhost, in order
apache to use it's own global file, Apache does start but i get when I try
to access the site "/index.html":
in error_log:
[Sun Dec 05 12:20:16 2004] [error] [client 192.168.0.2] (13)Permission
denied: access to /index.html denied

in acess_log:
192.168.0.2 - - [05/Dec/2004:12:20:16 +0000] "GET /index.html HTTP/1.1" 403
419 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"

and the index.html does exists and has correct permisssions (i think):
[root@wd-linux-1 public_html]# pwd
/home/dev/public_html
[root@wd-linux-1 public_html]# ls -la
total 24
drwxr-xr-x 2 dev dev 4096 Dec 5 11:23 .
drwxr-xr-x 8 dev dev 4096 Dec 5 11:20 ..
-rw-r--r-- 1 dev dev 3 Dec 5 11:23 index.html



Any ideas?? Something weird is happening here...
Please help me. ;-)
 
Old 12-08-2004, 11:21 AM   #2
Wonderm00n
LQ Newbie
 
Registered: Dec 2004
Posts: 4

Original Poster
Rep: Reputation: 0
SOLVED!!

Man... The problem WASN'T apache at all....

It was SELINUX that was denning access to /home to apache...

I've just disabled SELINUX, after having a pain in the ass trying to change SELINUX config's and not beeing able to! (But that's yet another problem... Any ideas on this?)

Thanks,
Marco
 
Old 04-09-2010, 09:33 PM   #3
cetb
LQ Newbie
 
Registered: Apr 2010
Posts: 1

Rep: Reputation: 0
Same the problem

But found error in apache error log:

(2)No such file or directory: httpd: could not open error log file /var/www/domains/xxxx/logs/error_log
 
  


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
Apache: Alias is working on ssl vhost but not on mass vhost jonavogt Linux - Software 0 06-07-2005 02:05 PM
Where is DocumentRoot? tfc MEPIS 3 06-02-2005 01:41 AM
Webmin: The Apache server executable /usr/local/apache2/bin does not exist hektor Linux - Software 0 01-14-2005 06:48 AM
vhost on fc2 install. defaults to 1 vhost only knightdog Linux - Newbie 8 11-12-2004 01:45 PM
DocumentRoot redhatlover Red Hat 3 04-27-2004 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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