Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Restrict a directory to specific methods?

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
restrict ssl - I want to restrict a directory cgi scripts to only be accessed via https.

Restrict access to localhost only - I want to prevent access to a specific directory with a .htaccess file. Only the local PHP module should be allowed to access that I've put a .htaccess file in the /> Order Deny from all Allow from

restrict access to everything but the default-document - i want to restrict access to in a directory with basic this works. i also want everybody to be able to see the default document of the directory in this case) without being prompted for this also..

How to restrict access to a specified virtual domain - Hi, using Apache2, and want to grant access rights the a specified virtual domain *only* for the specified How to do this? Best regards dd

How can i restrict the size of file uploads and downloads - I have a webserver that has various websites on it. What I want to be able to do is configure apache so that it will not allow files larger than about 5Mb to be Therefore if it has some large files on it. They are not permitted to be..
Next:  Apache: Mail Server  
Author Message
spam_this

External


Since: Jan 06, 2004
Posts: 11



(Msg. 1) Posted: Thu Jan 26, 2006 3:55 am
Post subject: Restrict a directory to specific methods?
Archived from groups: alt>apache>configuration (more info?)

Hi All,

I've been fiddling with this on and off for a few days and haven't found a
solution. I have a directory that is being hammered by referrer spam.
I've mitigated that largely with a fancy redirect if the referrer matches a
list of known spam domains.

HOWEVER, it doesn't catch unknown spam domains. I have noticed these
spineless losers generally use the "HEAD" method to make their requests -
fills my logs and is only a very small bandwidth penalty for them. So I
want to slow them down by restricting it GET requests only.

So, I'd like to restrict the directory (and all subdirectories) to "GET"
requests only, everything else should get a 403.

I've tried:

<Directory "/var/www/...../foo">
<Limit HEAD>
Order allow,deny
Deny from All
</Limit>
</Directory>

....and similar using,
<LimitExcept GET>
Order deny,allow
Deny from All
</LimitExcept>

...and other combinations of the two. So far, no joy.

I've managed to get a 403 response for any/all requests, or a 200 response
for any/all requests, but not a HEAD=403, GET=200.

Any ideas??

Cheers,

James
--
O Batman pegou seu bat-sapato social e seu bat-blazer. Onde ele foi?
A um Bat-zado

 >> Stay informed about: Restrict a directory to specific methods? 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (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 ]