Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have this issue with web application inspection software. the recommendation was to disable OPTION METHODS on the webserver.

upon research. i have included this snippet on my httpd.conf then restarted the server.

LoadModule rewrite_module /usr/lib/apache2/modules/
RewriteEngine On
RewriteRule .* - [F]

how can i verify if the code is implemented and will block all OPTIONS request?

i have tried this

curl --request OPTIONS

but all i get is 301 Moved Permantently

<title>301 Moved Permanently</title>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="">here</a>.</p>
<address>Apache/2.2.22 (Ubuntu) Server at Port 80</address>
share|improve this question

Rather than using mod_rewrite, you should be able to disable arbitrary methods using the Limit or LimitExcept directives which are designed to to just what you want.

You can test using nc or telnet to talk directly to the httpd process

$ nc yourhost.tld 80
Host: yourhost.tld

 (press enter a couple of times here and the server responds)

HTTP/1.1 200 OK
Date: Mon, 16 Dec 2013 09:16:40 GMT
Server: Apache
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.