You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Yashesh Bhatia <ya...@gmail.com> on 2006/08/31 13:05:21 UTC

[users@httpd] Virtual hosts question - permission denied error httpd version 2.2.3

hello:

   i'm experimenting name based virtual hosts and i have the following
apache setup

/opt/apache2/htdocs/index.html
/opt/apache2/htdocs2/index2.html


Now i have the following entry in my /opt/apache2/conf/extra/httpd-vhosts.conf

======================================================================
NameVirtualHost 192.168.1.3:80
<VirtualHost 192.168.1.3:80>
    DocumentRoot "/opt/apache2/htdocs"
</VirtualHost>

<VirtualHost localhost:80>
    DocumentRoot "/opt/apache2/htdocs2"
</VirtualHost>
======================================================================

the syntax check passes
[root@sun apache2]# apachectl -t
Syntax OK

After restarting when i check the url
http://192.168.1.3/
it gives content of htdocs/index.html

however when i do http://127.0.0.1/
it gives me an error
Forbidden You don't have permission to access / on this server.

The file permissions look ok to me.. out of ls -al /opt/apache2/ is below

[root@sun apache2]# ls -al
total 128
drwxr-xr-x 17 root root 4096 Aug 31 15:44 .
drwxr-xr-x  6 root root 4096 Aug 31 16:21 htdocs
drwxr-xr-x  2 root root 4096 Aug 31 16:12 htdocs2
drwxr-xr-x  2 root root 4096 Aug 31 16:12 htdocs3

and [root@sun apache2]# ls -l htdocs/index.html htdocs2/index.html
htdocs3/index.html
-rw-r--r-- 1 root root 23 Aug 31 15:47 htdocs2/index.html
-rw-r--r-- 1 root root 23 Aug 31 15:47 htdocs3/index.html
-rw-r--r-- 1 root root 44 Nov 21  2004 htdocs/index.html

on checking the error log i see the message
[Thu Aug 31 16:29:46 2006] [error] [client 127.0.0.1] client denied by
server configuration: /opt/apache2/htdocs2/


Any reason why the documentroot of /opt/apache2/htdocs2 does not work fine.

Thanks..

Yashesh

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual hosts question - permission denied error httpd version 2.2.3

Posted by Yashesh Bhatia <ya...@gmail.com>.
hi ashutosh:

  thx for the tip.. tried

NameVirtualHost *:80
it did not work. gives the same error and also the syntax check gives a warning
[root@sun htdocs]# apachectl -t
[Thu Aug 31 17:18:03 2006] [warn] NameVirtualHost *:80 has no VirtualHosts
Syntax OK


tried with NameVirtualHost *
does not work....
[root@sun htdocs]# apachectl -t
[Thu Aug 31 17:21:06 2006] [warn] NameVirtualHost *:0 has no VirtualHosts
Syntax OK


thanks.

yashesh

On 8/31/06, Ashutosh Mohanty <as...@syncad.com> wrote:
> hi,
> try-out with
>
> "NameVirtualHost *:80" or "NameVirtualHost *"
>
>
>
> Best Regards
>
> Ashutosh
>
> SynaptiCAD Inc.
>
> ----- Original Message -----
> From: "Yashesh Bhatia" <ya...@gmail.com>
> To: <us...@httpd.apache.org>
> Sent: Thursday, August 31, 2006 4:35 PM
> Subject: [users@httpd] Virtual hosts question - permission denied error
> httpd version 2.2.3
>
>
> > hello:
> >
> >    i'm experimenting name based virtual hosts and i have the following
> > apache setup
> >
> > /opt/apache2/htdocs/index.html
> > /opt/apache2/htdocs2/index2.html
> >
> >
> > Now i have the following entry in my
> /opt/apache2/conf/extra/httpd-vhosts.conf
> >
> > ======================================================================
> > NameVirtualHost 192.168.1.3:80
> > <VirtualHost 192.168.1.3:80>
> >     DocumentRoot "/opt/apache2/htdocs"
> > </VirtualHost>
> >
> > <VirtualHost localhost:80>
> >     DocumentRoot "/opt/apache2/htdocs2"
> > </VirtualHost>
> > ======================================================================
> >
> > the syntax check passes
> > [root@sun apache2]# apachectl -t
> > Syntax OK
> >
> > After restarting when i check the url
> > http://192.168.1.3/
> > it gives content of htdocs/index.html
> >
> > however when i do http://127.0.0.1/
> > it gives me an error
> > Forbidden You don't have permission to access / on this server.
> >
> > The file permissions look ok to me.. out of ls -al /opt/apache2/ is below
> >
> > [root@sun apache2]# ls -al
> > total 128
> > drwxr-xr-x 17 root root 4096 Aug 31 15:44 .
> > drwxr-xr-x  6 root root 4096 Aug 31 16:21 htdocs
> > drwxr-xr-x  2 root root 4096 Aug 31 16:12 htdocs2
> > drwxr-xr-x  2 root root 4096 Aug 31 16:12 htdocs3
> >
> > and [root@sun apache2]# ls -l htdocs/index.html htdocs2/index.html
> > htdocs3/index.html
> > -rw-r--r-- 1 root root 23 Aug 31 15:47 htdocs2/index.html
> > -rw-r--r-- 1 root root 23 Aug 31 15:47 htdocs3/index.html
> > -rw-r--r-- 1 root root 44 Nov 21  2004 htdocs/index.html
> >
> > on checking the error log i see the message
> > [Thu Aug 31 16:29:46 2006] [error] [client 127.0.0.1] client denied by
> > server configuration: /opt/apache2/htdocs2/
> >
> >
> > Any reason why the documentroot of /opt/apache2/htdocs2 does not work
> fine.
> >
> > Thanks..
> >
> > Yashesh
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual hosts question - permission denied error httpd version 2.2.3

Posted by Ashutosh Mohanty <as...@syncad.com>.
hi,
try-out with

"NameVirtualHost *:80" or "NameVirtualHost *"



Best Regards

Ashutosh

SynaptiCAD Inc.

----- Original Message ----- 
From: "Yashesh Bhatia" <ya...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Thursday, August 31, 2006 4:35 PM
Subject: [users@httpd] Virtual hosts question - permission denied error
httpd version 2.2.3


> hello:
>
>    i'm experimenting name based virtual hosts and i have the following
> apache setup
>
> /opt/apache2/htdocs/index.html
> /opt/apache2/htdocs2/index2.html
>
>
> Now i have the following entry in my
/opt/apache2/conf/extra/httpd-vhosts.conf
>
> ======================================================================
> NameVirtualHost 192.168.1.3:80
> <VirtualHost 192.168.1.3:80>
>     DocumentRoot "/opt/apache2/htdocs"
> </VirtualHost>
>
> <VirtualHost localhost:80>
>     DocumentRoot "/opt/apache2/htdocs2"
> </VirtualHost>
> ======================================================================
>
> the syntax check passes
> [root@sun apache2]# apachectl -t
> Syntax OK
>
> After restarting when i check the url
> http://192.168.1.3/
> it gives content of htdocs/index.html
>
> however when i do http://127.0.0.1/
> it gives me an error
> Forbidden You don't have permission to access / on this server.
>
> The file permissions look ok to me.. out of ls -al /opt/apache2/ is below
>
> [root@sun apache2]# ls -al
> total 128
> drwxr-xr-x 17 root root 4096 Aug 31 15:44 .
> drwxr-xr-x  6 root root 4096 Aug 31 16:21 htdocs
> drwxr-xr-x  2 root root 4096 Aug 31 16:12 htdocs2
> drwxr-xr-x  2 root root 4096 Aug 31 16:12 htdocs3
>
> and [root@sun apache2]# ls -l htdocs/index.html htdocs2/index.html
> htdocs3/index.html
> -rw-r--r-- 1 root root 23 Aug 31 15:47 htdocs2/index.html
> -rw-r--r-- 1 root root 23 Aug 31 15:47 htdocs3/index.html
> -rw-r--r-- 1 root root 44 Nov 21  2004 htdocs/index.html
>
> on checking the error log i see the message
> [Thu Aug 31 16:29:46 2006] [error] [client 127.0.0.1] client denied by
> server configuration: /opt/apache2/htdocs2/
>
>
> Any reason why the documentroot of /opt/apache2/htdocs2 does not work
fine.
>
> Thanks..
>
> Yashesh
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual hosts question - permission denied error httpd version 2.2.3

Posted by Yashesh Bhatia <ya...@gmail.com>.
reimer,

    i did not have a <Directory> container for /opt/apache2/htdocs2 ...
added it in the section

<VirtualHost localhost:80>
    DocumentRoot "/opt/apache2/htdocs2"
     <Directory "/opt/apache2/htdocs2">
        AllowOverride All
         Order allow,deny
         Allow from all
     </Directory>
</VirtualHost>

and it works fine now. thx for pointing it out.

yashesh


On 8/31/06, Riemer Palstra <ri...@palstra.com> wrote:
> On Thu, Aug 31, 2006 at 04:35:21PM +0530, Yashesh Bhatia wrote:
> > [Thu Aug 31 16:29:46 2006] [error] [client 127.0.0.1] client denied by
> > server configuration: /opt/apache2/htdocs2/
>
> Show us your <Directory> settings for the above, do the look somewhat
> like:
>
> <Directory /opt/apache2/htdocs2>
>     AllowOverride None
>     Order Allow,Deny
>     Allow from all
> </Directory>
>
> --
> Riemer Palstra                                Amsterdam, The Netherlands
> riemer@palstra.com                               http://www.palstra.com/
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual hosts question - permission denied error httpd version 2.2.3

Posted by Riemer Palstra <ri...@palstra.com>.
On Thu, Aug 31, 2006 at 04:35:21PM +0530, Yashesh Bhatia wrote:
> [Thu Aug 31 16:29:46 2006] [error] [client 127.0.0.1] client denied by
> server configuration: /opt/apache2/htdocs2/

Show us your <Directory> settings for the above, do the look somewhat
like:

<Directory /opt/apache2/htdocs2>
    AllowOverride None
    Order Allow,Deny
    Allow from all
</Directory>

-- 
Riemer Palstra		     		      Amsterdam, The Netherlands
riemer@palstra.com				 http://www.palstra.com/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org