Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

virtual hosts deny not working

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  Using mod ReWrite to redirect request with certai..  
Author Message
Peter

External


Since: Oct 23, 2007
Posts: 4



(Msg. 1) Posted: Tue Oct 23, 2007 5:58 pm
Post subject: virtual hosts deny not working
Archived from groups: alt>apache>configuration (more info?)

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?



<Directory />
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
</Directory>
</VirtualHost>

 >> Stay informed about: virtual hosts deny not working 
Back to top
Login to vote
HansH

External


Since: Dec 08, 2006
Posts: 162



(Msg. 2) Posted: Wed Oct 24, 2007 11:23 am
Post subject: Re: virtual hosts deny not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Peter" <me DeleteThis @privacy.net> 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.
>
> <Directory />
> 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
<Directory /local/path/to/document/root >
or
<Location / >

HansH

 >> Stay informed about: virtual hosts deny not working 
Back to top
Login to vote
Peter

External


Since: Oct 23, 2007
Posts: 4



(Msg. 3) Posted: Wed Oct 24, 2007 11:23 am
Post subject: Re: virtual hosts deny not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"HansH" <hansh.TakeThisOut@invalid.invalid> wrote in message
news:471f0f83$0$227$e4fe514c@news.xs4all.nl...
> "Peter" <me.TakeThisOut@privacy.net> 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.
>>
>> <Directory />
>> 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
> <Directory /local/path/to/document/root >
> or
> <Location / >
>
> 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

<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Location/>
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
</Location>
</VirtualHost>
 >> Stay informed about: virtual hosts deny not working 
Back to top
Login to vote
Peter

External


Since: Oct 23, 2007
Posts: 4



(Msg. 4) Posted: Wed Oct 24, 2007 11:23 am
Post subject: Re: virtual hosts deny not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Peter" <me RemoveThis @privacy.net> wrote in message
news:13hu4skkq2hc732@corp.supernews.com...
>
> "HansH" <hansh RemoveThis @invalid.invalid> wrote in message
> news:471f0f83$0$227$e4fe514c@news.xs4all.nl...
>> "Peter" <me RemoveThis @privacy.net> 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.
>>>
>>> <Directory />
>>> 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
>> <Directory /local/path/to/document/root >
>> or
>> <Location / >
>>
>> HansH
>




Sorry i realised my own tag mistake <Location >

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.
 >> Stay informed about: virtual hosts deny not working 
Back to top
Login to vote
HansH

External


Since: Dec 08, 2006
Posts: 162



(Msg. 5) Posted: Wed Oct 24, 2007 12:02 pm
Post subject: Re: virtual hosts deny not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Peter" <me.DeleteThis@privacy.net> 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.
>>>>
>>>> <Directory />
>>>> 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
>>> <Directory /local/path/to/document/root >
>>> or
>>> <Location / >
>>>
> Sorry i realised my own tag mistake <Location >
>
> 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.
 >> Stay informed about: virtual hosts deny not working 
Back to top
Login to vote
Peter

External


Since: Oct 23, 2007
Posts: 4



(Msg. 6) Posted: Wed Oct 24, 2007 12:02 pm
Post subject: Re: virtual hosts deny not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"HansH" <hansh.DeleteThis@invalid.invalid> wrote in message
news:471f18ca$0$229$e4fe514c@news.xs4all.nl...
> "Peter" <me.DeleteThis@privacy.net> 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.
>>>>>
>>>>> <Directory />
>>>>> 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
>>>> <Directory /local/path/to/document/root >
>>>> or
>>>> <Location / >
>>>>
>> Sorry i realised my own tag mistake <Location >
>>
>> 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 Smile. 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
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Deny from 202.*.*.*
</Directory>

The fact the document root is specified the <directory> tag should therefore
cover this directory and all its subdirectories and therefore deny of ip
202.*.*.* should take effect imo
 >> Stay informed about: virtual hosts deny not working 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Does &quot;deny from&quot; affect virtual hosts? - If I add IP's to the deny from in my httpd.conf file will this also affect virtual hosts?

Virtual Hosts not working - Got 2 virtual hosts and the virtualhost basic whevever I goto www.mydomain1.com it's fine, but when I goto www.mydomain2.net it points to the default:80 vhost my configuration is: namevirtualhost * <virtualhost *> servername domain1.com extrabi...

Virtual hosts not working - CentOS 5 Apache 2.2.3 I've configured Apache with virtual hosting to run 3 domains, 2 pointing to: /var/www/html/danny ..... and the 3rd pointing to: /var/www/html/richmond However, all requests for www.therichmondstudio.co.uk return pages from the...

Apache22 FreeBSD Install and Virtual Hosts not working - I am trying for a pretty basic install here but to no avail. FreeBSD 6.0 Apache22 (From Ports) Apache serves pages from the default folder but... I get the following error on a restart httpd: Syntax error on line 407 of..

anyone have multiple virtual hosts over SSL working on Ubu.. - I have been fighting my Apache2 config for months trying to get multiple virtual hosts working over SSL. Does anyone have this working for Ubuntu 7.10? I'd love to see how you've done it. Cheers, Scott
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]