我正在尝试安装mod_xsendfile。
我做了:
apxs2 -cia mod_xsendfile.c
错误:
apxs:Error: Activation failed for custom /etc/apache2/httpd.conf file.. apxs:Error: At least one `LoadModule' directive already has to exist..
文件/etc/apache2/httpd.conf是空的。 但是,/ etc / apache2 / mods-available和mods-enabled /里面有很多模块configuration。
我必须添加一个虚拟元素到httpd.conf? 还是有不同的解决scheme?
有没有在apache2.conf中的任何东西?
你需要告诉它包括启用mods的文件。
就像是:
# Include module configuration: Include mods-enabled/*.load Include mods-enabled/*.conf
通过与ALex_hha的评论回答:
创build一个/etc/apache2/mods-available/xsendfile.load文件,内容:
LoadModule xsendfile_module /usr/lib/apache2/modules/mod_xsendfile.so
并在/etc/apache2/mods-enabled/xsendfile.load中创build一个符号链接。
对此模块进行必要的更改并重新启动apache2。