virtual hosts deny not working
virtual hosts deny not working
am 23.10.2007 23:19:26 von Hans-Peter Sauer
Can anyone tell me what is wrong with the below or a reason why this isnt
taking effect.
My stats show im still getting hits from the IP's im denying
Could Allow all be in the httpd and overriding this?
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Deny from 61.
Deny from 202.
Deny from 203.
Deny from 210.214.
Deny from 220.224.
Deny from 220.225.
Deny from 220.226.
Deny from 220.227.
Deny from 213.251.189.203
Deny from .in
Deny from .ru
Re: virtual hosts deny not working
am 24.10.2007 11:23:17 von HansH
"Peter" schreef in bericht
news:13hspb8njh8fpb9@corp.supernews.com...
> Can anyone tell me what is wrong with the below or a reason why this isnt
> taking effect.
>
>
> Options FollowSymLinks
> AllowOverride None
> Order allow,deny
You're now protecting the root of your file system, unlikely being the root
of any site.
Either use
or
HansH
Re: virtual hosts deny not working
am 24.10.2007 11:42:31 von Hans-Peter Sauer
"HansH" wrote in message
news:471f0f83$0$227$e4fe514c@news.xs4all.nl...
> "Peter" schreef in bericht
> news:13hspb8njh8fpb9@corp.supernews.com...
>> Can anyone tell me what is wrong with the below or a reason why this isnt
>> taking effect.
>>
>>
>> Options FollowSymLinks
>> AllowOverride None
>> Order allow,deny
> You're now protecting the root of your file system, unlikely being the
> root of any site.
>
> Either use
>
> or
>
>
> HansH
I assumed the directory tag was the home directory since the document route
is specified in the virtual host
DocumentRoot /var/www/site1
I tried adding location but this did not work, Error expected but saw
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Deny from 61.
Deny from 202.
Deny from 203.
Deny from 210.214.
Deny from 220.224.
Deny from 220.225.
Deny from 220.226.
Deny from 220.227.
Deny from .in
Deny from .ru
Re: virtual hosts deny not working
am 24.10.2007 12:00:06 von Hans-Peter Sauer
"Peter" wrote in message
news:13hu4skkq2hc732@corp.supernews.com...
>
> "HansH" wrote in message
> news:471f0f83$0$227$e4fe514c@news.xs4all.nl...
>> "Peter" schreef in bericht
>> news:13hspb8njh8fpb9@corp.supernews.com...
>>> Can anyone tell me what is wrong with the below or a reason why this
>>> isnt
>>> taking effect.
>>>
>>>
>>> Options FollowSymLinks
>>> AllowOverride None
>>> Order allow,deny
>> You're now protecting the root of your file system, unlikely being the
>> root of any site.
>>
>> Either use
>>
>> or
>>
>>
>> HansH
>
Sorry i realised my own tag mistake
I am somewhat concerned now that my original directory config did not take
effect and location was needed. I am still unsure why this is.
Re: virtual hosts deny not working
am 24.10.2007 12:02:50 von HansH
"Peter" schreef in bericht
news:13hu5th4qanma4e@corp.supernews.com...
>>>> Can anyone tell me what is wrong with the below or a reason why this
>>>> isnt taking effect.
>>>>
>>>>
>>>> Options FollowSymLinks
>>>> AllowOverride None
>>>> Order allow,deny
>>> You're now protecting the root of your file system, unlikely being the
>>> root of any site.
>>>
>>> Either use
>>>
>>> or
>>>
>>>
> Sorry i realised my own tag mistake
>
> I am somewhat concerned now that my original directory config did not take
> effect and location was needed. I am still unsure why this is.
>
http://httpd.apache.org/docs/2.2/mod/core.html#directory
http://httpd.apache.org/docs/2.2/mod/core.html#location
HansH
--
This product is shipped without a Rich Text Formatted Manual.
Re: virtual hosts deny not working
am 24.10.2007 12:18:19 von Hans-Peter Sauer
"HansH" wrote in message
news:471f18ca$0$229$e4fe514c@news.xs4all.nl...
> "Peter" schreef in bericht
> news:13hu5th4qanma4e@corp.supernews.com...
>>>>> Can anyone tell me what is wrong with the below or a reason why this
>>>>> isnt taking effect.
>>>>>
>>>>>
>>>>> Options FollowSymLinks
>>>>> AllowOverride None
>>>>> Order allow,deny
>>>> You're now protecting the root of your file system, unlikely being the
>>>> root of any site.
>>>>
>>>> Either use
>>>>
>>>> or
>>>>
>>>>
>> Sorry i realised my own tag mistake
>>
>> I am somewhat concerned now that my original directory config did not
>> take effect and location was needed. I am still unsure why this is.
>>
> http://httpd.apache.org/docs/2.2/mod/core.html#directory
> http://httpd.apache.org/docs/2.2/mod/core.html#location
>
> HansH
>
I am not that bad :). I had already RTFM
As a full example. Here is my Virtual host
DocumentRoot /usr/local/apache/share/site1
ServerName www.site1
DirectoryIndex index.htm index.html index.php
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Deny from 202.*.*.*
The fact the document root is specified the tag should therefore
cover this directory and all its subdirectories and therefore deny of ip
202.*.*.* should take effect imo