How do I disallow a file type

5 posts / 0 new
Last post
#1 Tue, 04/16/2013 - 07:24
DoubleSpeed

How do I disallow a file type

I need to stop the server from serving *.inc files, please can someone advise how I do this ideally globally for the whole sever or if not specific for a host?

Tue, 04/16/2013 - 08:07
andreychek

Howdy,

There's an article here that describes how to block files containing a particular extension:

http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certai...

Tue, 04/16/2013 - 08:16
DoubleSpeed

Where would I add this for a global server wide setting?

Tue, 04/16/2013 - 09:32
andreychek

You'd add that to any part of your Apache config that's not within a VirtualHost block (a VirtualHost block would be how to add it for one domain).

-Eric

Tue, 04/16/2013 - 11:42
DoubleSpeed

Thank you all working great!

Topic locked