我在Ubuntu 14.04上安装了Apache 5.4的PHP 5.4。 Php 5.4在apt-get上不可用,所以我必须从源代码安装。 我已经安装了
apache2-prefork-dev apache2-mpm-prefork
而我configurationPHP
./configure --with-apxs2=/usr/bin/apxs2 --with-mysql --with-curl
然后我build立并安装。 我将这行添加到/etc/apache2/apache2.conf:
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_prefork.so LoadModule php5_module modules/libphp5.so AddType application/x-http-php .php
当我尝试重新启动Apache时出现此错误:
module mpm_event_module is already loaded, skipping
我在.conf文件里面search,但是之前没有加载模块。 编辑:
正如@Andrew Schulman的回答,我可以find它
/etc/apache2/mods-available/mpm_event.load
当我跑步
a2enmod mpm_event
我得到这个:
Considering conflict mpm_worker for mpm_event: Considering conflict mpm_prefork for mpm_event: Considering conflict mpm_itk for mpm_event:
我如何解决冲突?
EDIT2:
我用了
a2dismod
上
mpm_event_module
并加载了mpm_prefork_module。 Apache重新启动好,但是当我尝试运行
a2enmod mpm_prefork_module
我得到这个:
ERROR: Module mpm_prefork_module does not exist!
这是什么意思?
您可以通过查看整个Apacheconfiguration来find它:
grep -r mpm_event_module /etc/apache2
几乎可以肯定地在/etc/apache2/mods-available/mpm_event.load中。 在Debian / Ubuntu中,启用和禁用Apache模块的标准方式是运行例如
a2dismod mpm_event a2enmod mpm_prefork
看到man a2enmod ,同样的man a2enconf和man a2ensite 。