473,321 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

how to restrict http methods

Hi

I am using Apache webserver, i would like to restrict some of the http methods (DELETE, TRACE) for security reasons. I am not looking for for specific directory I want these methods should be restricted when a request made to the server, this is to avoid security threats. Please help me in this.

-Kiran
Jul 24 '12 #1
3 3182
Luuk
1,047 Expert 1GB
The answer is in the docs.
Expand|Select|Wrap|Line Numbers
  1. <Limit DELETE>
  2.     AllowOverride
  3.     Order allow,deny
  4.     Deny from all
  5.  </Limit>
(see: http://httpd.apache.org/docs/2.2/mod/core.html#limit
Jul 27 '12 #2
restrict HTTP in web.xml methods by the following code
<security-constraint>
<web-resource-collection>
<web-resource-name>restricted methods</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>TRACE</http-method>
<http-method>PUT</http-method>
<http-method>OPTIONS</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint />
</security-constraint>
Sep 25 '12 #3
Luuk
1,047 Expert 1GB
@lisaflorence: where, in apache, do you expect the reader of your message to put that?

I'm not new to apache, but never seen a 'web.xml' in any configuration part of apache......
Sep 25 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

99
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less...
3
by: John Reese | last post by:
Hello there. I've run into some missing functionality with HTTP Digest authentication in the 2.3 library and I was wondering if I'm just missing something. Missing functionality the first:...
28
by: gc | last post by:
Hi, What is the purpose of the restrict keyword? gc
0
by: dotnettester | last post by:
Hi, I am wondering if there is a way to restrict access to some methods within a component to some developers and restrict it to others??
16
by: Art | last post by:
Hi, I'd like to be able to create a class that inherits "Label". I want to define a number of properties and methods for my new class. The Question: Can I prevent a user of this new class...
10
by: David Hirschfield | last post by:
Here's a strange concept that I don't really know how to implement, but I suspect can be implemented via descriptors or metaclasses somehow: I want a class that, when instantiated, only defines...
12
by: Me | last post by:
I'm trying to wrap my head around the wording but from what I think the standard says: 1. it's impossible to swap a restrict pointer with another pointer, i.e. int a = 1, b = 2; int *...
21
by: Niu Xiao | last post by:
I see a lot of use in function declarations, such as size_t fread(void* restrict ptr, size_t size, size_t nobj, FILE* restrict fp); but what does the keyword 'restrict' mean? there is no...
2
by: wwwmike | last post by:
Hello everybody. I developed a simple HTTP Handler on my local machine WIN XP and the Handler get called. Everyting worked fine However, when I moved sources to my hosting provider the HTTP...
0
by: =?Utf-8?B?UGF2aXRocmE=?= | last post by:
I actually used a tool called HFS(HTTP File Server 2.2a) which allows to upload or download files but with this tool am able to retrieve the contents of the page using GET method but not able to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.