APACHE2 DocumentRoot does not exist for Vhost

APACHE2 DocumentRoot does not exist for Vhost

am 05.12.2004 13:23:49 von Marco Almeida

I there...

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

I've created an vhost:

ServerName dev.xxxxx.org
ServerAlias www.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/

Options Indexes IncludesNOEXEC FollowSymLinks

SuexecUserGroup dev dev


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. ;-)

Re: APACHE2 DocumentRoot does not exist for Vhost

am 05.12.2004 13:56:39 von Davide Bianchi

> Starting httpd: Warning: DocumentRoot [/home/dev/public_html] does not exist
> 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.

Are you starting this from a Chrooted environment? Maybe Apache and you
have different ideas about where '/' is. And what kind of permission you
have on the log files.

Davide

--
The day Micro$lop makes something that doesn't suck is probably the
day they start making vacuum cleaners.
--Ernst Jan Plugge

Re: APACHE2 DocumentRoot does not exist for Vhost

am 05.12.2004 15:05:09 von Marco Almeida

Hi there,

I'm not running this on a chrooted environment... If I remove this vhost,
apache sucessfully uses the /var/www default dir and shows the website.

The log files do not exist yet... they should be created by apache on the
first sucessfuly acces to this vhost, right?

I'm driving mad here...

Marco

"Davide Bianchi" wrote in message
news:slrncr61dh.14f.davideyeahsure@fogg.onlyforfun.net...
> > Starting httpd: Warning: DocumentRoot [/home/dev/public_html] does not
exist
> > 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.
>
> Are you starting this from a Chrooted environment? Maybe Apache and you
> have different ideas about where '/' is. And what kind of permission you
> have on the log files.
>
> Davide
>
> --
> The day Micro$lop makes something that doesn't suck is probably the
> day they start making vacuum cleaners.
> --Ernst Jan Plugge

Re: APACHE2 DocumentRoot does not exist for Vhost

am 05.12.2004 15:40:21 von Davide Bianchi

On 2004-12-05, Marco Almeida wrote:
> I'm not running this on a chrooted environment... If I remove this vhost,
> apache sucessfully uses the /var/www default dir and shows the website.

Then Apache does works, what I can think from the informations you
posted is that Apache can't see or access the directory you indicated
as DocumentRoot. He is trying to access /home/dev/public_html, and
he is reporting that such directory doesn't exists. Maybe the directory
is a network directory mounted on a remote machine? Also, he complains
that he can't write on the log directory, and if you run Apache as
root, he should be able to write in there.

> The log files do not exist yet... they should be created by apache on the
> first sucessfuly acces to this vhost, right?

No, they are created when you start Apache, but if he can't find the
DocumentRoot maybe he can't even found the log directory, hence the
error.

Davide

--
Doing things randomly is what Admins do best. clickety-click
-- Joe Moore on alt.sysadmin.recovery