My server is getting hit hard by bots, etc., looking for various files in /cgi-bin/
, like search.cgi, YaBB.pl, gitweb.perl, perl, gitweb.pl, htsearch,
and on and on.
I want to deny all access (send a 403 Forbidden header) for all possible file names and extensions in /cgi-bin
/ . (This is a shared server, so I only have access to .htaccess, not vhosts
or httpd
).
In an .htaccess in cgi-bin
I've tried
deny from all
as well as
<FilesMatch "\.cgi?$">
Order Allow,Deny
Allow from All
</FilesMatch>
for just .cgi
extensions, with no luck for either.
How can I deny access for everything in /cgi-bin/
?
Do I need to list all file names and extensions in a <FilesMatch
directive?