Ubuntu 14.04 升级破坏了 Apache2

Den*_*isk 11 linux apache-http-server ubuntu

我刚刚升级到 ubuntu 14.04,现在 apache2 无法启动,出现错误:

root@dennisHome:~# /etc/init.d/apache2 restart
* Restarting web server apache2
...fail!
* The apache2 configtest failed.
Run Code Online (Sandbox Code Playgroud)

配置测试的输出是:

apache2: Syntax error on line 244 of /etc/apache2/apache2.conf: 
Syntax error on line 1 of /etc/apache2/mods-enabled/authz_default.load: Cannot load       /usr/lib/apache2/modules/mod_authz_default.so into server: 
/usr/lib/apache2/modules/mod_authz_default.so: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information
Run Code Online (Sandbox Code Playgroud)

看起来 mod_authz_default.so 已经不存在了,我该怎么做才能解决这个问题?

Mar*_*iae 13

在升级到 Ubuntu 14.04 的过程中,您还将升级到 Apache 2.4(大概是 2.2)。这不是一个微不足道的更改,您可以在此处找到所需的调整列表。你会看到有一些工作要做。特别是,该页面指出(除其他外):

这些模块已被删除:mod_authn_default、mod_authz_default、mod_mem_cache。

这就是您收到上述错误消息的原因。您可以尝试注释掉 apache.conf 的违规行 244,看看您的系统是否可以通过这种方式(但我对此表示怀疑)。