I’m building a web server distributing variety kind of binary files. (with Ubuntu) They have vary extensions and sometimes has wrong extension. But currently, my Apache server serves unknown files as text. So I have to make my Apache2 serve all files as binary by default regardless of extension or any metadata except some explicit cases. How can I archive this?
Try this directive on your site configuration:
Or this one:
The default seems to be text/plain:
DefaultType Directive Description: MIME content-type that will be sent if the server cannot determine a type in any other way Syntax: DefaultType MIME-type|none Default: DefaultType text/plain Context: server config, virtual host, directory, .htaccess