How to enable mod_mime on apache2
17,947
Try this instead
sudo a2enmod mime
The mod_
prefix is implicitly added.
a2enmod
will look for /etc/apache2/mods-available/MODULENAME.load
where MODULENAME
is the name you supplied as an argument.
The file would then be symlinked to /etc/apache2/mods-enabled/MODULENAME.load
.
If you look at the contents of that file, it should say:
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
This tells us that the mod_mime.so
library will later be loaded as mime_module
.
Related videos on Youtube
Author by
Richard
Updated on September 18, 2022Comments
-
Richard almost 2 years
I am running apache2 on debian 6. I am wondering how do I enable mod_mime? according to an Answer here, I need mod_mime loaded so that my webserver can load .css files. Current Modules I have loaded Are:
$ sudo apache2ctl -M apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName Loaded Modules: core_module (static) log_config_module (static) logio_module (static) mpm_prefork_module (static) http_module (static) so_module (static) alias_module (shared) auth_basic_module (shared) authn_file_module (shared) authz_default_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgi_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) mime_module (shared) mime_magic_module (shared) negotiation_module (shared) php5_module (shared) reqtimeout_module (shared) setenvif_module (shared) status_module (shared) Syntax OK
when I try
sudo a2enmod mod_mime
I getERROR: Module mode_mime does not exist!
-
Richard over 11 yearshmmm, says it is already enabled. mod_mime obviously must be the same as mime_module
-
Richard over 11 yearsThanks for your help. Do you know how I setup apache to load .css files. I added lines
AddType text/css .css
andAddType text/javascript .js
toapache.conf
, however style sheets are still not loading. -
Oliver Salzburg over 11 years@Richard: I don't really understand the linked question. Apache shouldn't really care about the type of the file. The settings regarding
mod_mime
affect what Apache will tell the client what type the file is. Please feel free to post an additional question outlining your original problem. Maybe we can find a solution :)