How to restrict allowed http methods in Apache
The following construction allows you to disable all http request methods in Apache
, except for GET
, POST
and HEAD
:
<Directory /var/www/html/>
<LimitExcept POST GET HEAD>
order allow,deny
deny from all
</LimitExcept>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
<Limit POST GET HEAD>
order allow,deny
allow from all
</Limit>
</Directory>