我在 Debian 6 上运行 apache2。我想知道如何启用 mod_mime?根据答案在这里,我需要加载 mod_mime,以便我的网络服务器可以加载 .css 文件。我目前已加载的模块有:
$ 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
当我尝试时sudo a2enmod mod_mime
我得到ERROR: Module mode_mime does not exist!
答案1
尝试一下
sudo a2enmod mime
前缀mod_
是隐式添加的。
a2enmod
将查找您作为参数提供的名称的/etc/apache2/mods-available/MODULENAME.load
位置。MODULENAME
该文件随后将被符号链接到/etc/apache2/mods-enabled/MODULENAME.load
。
如果你查看该文件的内容,它应该显示:
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
这告诉我们该mod_mime.so
库稍后将被加载为mime_module
。