You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Olivier Sannier <ol...@obones.com> on 2004/06/07 12:30:31 UTC

[users@httpd] Access Denied from server when using a Virtual Host

Hi

When I am logged directly on my web server, I cannot access (error 403) a 
virtual host that has been restricted to the internal network. When I 
access the virtual host from the internal network, it works well.

Here is the definition for the virtual host:

<Directory "/files/web/test">
	AllowOverride None
	Options -All
	Order deny,allow
	Allow from test.mydomain.com, user1234.some-isp.com, 1.2.3.4, 127.0.0.1, 
10.10.10.0/24
	Deny from all
</Directory>

<VirtualHost *>
	ServerName	test.mydomain.com
	DocumentRoot	/files/web/test
</VirtualHost>

test.mydomain.com resolves to 1.2.3.4 but 1.2.3.4 resolves to 
user1234.some-isp.com so I put them all in the configuration directive.

I of course restart the server everytime I change the configuration. 
Everytime I try to access the server while I'm logged on it, I get a line 
similar to that one in error_log:
[Mon Jun 07 20:12:10 2004] [error] [client 1.2.3.4] client denied by server 
configuration: /files/web/test/

However, if I access it from one of the machine on 10.10.10.0/24 it works 
perfectly fine.

This behaviour also happens if only a subdirectory of the virtual host is 
restricted to the internal network using a similar configuration.

Can anyone explain what I am missing here ?

Thanks a lot for your help.

Olivier


---------------------------------------------------------------------
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] Access Denied from server when using a Virtual Host

Posted by Olivier Sannier <ol...@obones.com>.
At 03:13 08/06/2004, you wrote:

>On Mon, 7 Jun 2004, Olivier Sannier wrote:
>>         Allow from test.mydomain.com, user1234.some-isp.com, 1.2.3.4, 
>> 127.0.0.1, 10.10.10.0/24
>
>The proper argument seperator is space, not comma.  Apache is probably 
>matching litterally against the hostname "1.2.3.4,".  Remove your commas, 
>and I suspect you'll have better luck.

You are absolutely right !
I don't know where the idea of comma came from...
Anyway it works fine now, thanks a lot for your help.

Cheers

Olivier 


---------------------------------------------------------------------
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] Access Denied from server when using a Virtual Host

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 7 Jun 2004, Olivier Sannier wrote:
> 	Allow from test.mydomain.com, user1234.some-isp.com, 1.2.3.4, 
> 127.0.0.1, 10.10.10.0/24

The proper argument seperator is space, not comma.  Apache is probably 
matching litterally against the hostname "1.2.3.4,".  Remove your commas, 
and I suspect you'll have better luck.

Joshua.

---------------------------------------------------------------------
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