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?


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

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

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).


Thank you all working great!