Re: [users@httpd] Quick and dirty way to block "cfm" and "cfc" file requests?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 23, 2005 at 10:53:50AM -0500, Jon Block wrote:
> I'm trying to say "For this one specific virtual host, block any requests to
> cfm and cfc files.
> 
> One thing to point out: the directory index order is set to "index.cfm,
> index.html". That means that if a request comes into www.example.com and the
> webserver tries to serve out index.html, that's okay. If it tries to serve
> out index.cfm, it should fail.
> 
> ----------
> <VirtualHost *>
>  ServerName www.example.com
>  DocumentRoot \\\\127.0.0.1\\bling
> 
>  <LocationMatch .*\.(cfm|cfc)>
>   order deny,allow
>   deny from all
>  </LocationMatch>
> 
> </VirtualHost>
> -----------

1) quotes around the LocationMatch argument
2) the first '.*' is not necessary, since you're not preceding it with ^
3) you should be $ terminating your LocationMatch string so that it
doesn't match on things like:

airconditioner.cfm.data.html
air-pollution.cfc.statistics.html

Something like:

<LocationMatch "\.(cfm|cfc)$">

You have the right idea, though. =)

--n

-- 
<huey> dd of=/dev/fd0 if=/dev/flippy bs=1024
<huey> ^^^ Making Flippy Floppy


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux