升级到Ubuntu 13.10 – Apache无法启动

我上周末更新到Ubuntu 13.10(来自Ubuntu 13.04),现在Apache无法启动。 它在升级之前工作得很好,我自己也没有改变任何东西。

当我重新启动时,这就是我得到的

apache2: Syntax error on line 260 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or directory 

所以,我创建了目录,然后我得到了这个:

  * Starting web server apache2 * * The apache2 configtest failed. Output of config test was: [Wed Oct 30 11:17:42.921934 2013] [proxy_html:notice] [pid 2496] AH01425: I18n support in mod_proxy_html requires mod_xml2enc. Without it, non-ASCII characters in proxied pages are likely to display incorrectly. AH00526: Syntax error on line 84 of /etc/apache2/apache2.conf: Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information. 

谢谢!

替换这一行

 LockFile ${APACHE_LOCK_DIR}/accept.lock 

有这个

 Mutex file:${APACHE_LOCK_DIR} default 

/etc/apache2/apache2.conf解决了这个问题。

附加信息:这是因为升级还会升级您的PHP。 如果从PHP5.3.X升级到PHP5.5.X – 并选择保留修改后的文件,您将发现此错误。

您将需要使用以下步骤安装mod_xml2enc:

确保你有mod_proxy:

 sudo apt-get install libapache2-mod-proxy-html 

对于mod_xml2enc

 sudo apt-get install apache2-prefork-dev mkdir ~/modbuild/ && cd ~/modbuild/ wget http://apache.webthing.com/svn/apache/filters/mod_xml2enc.c wget http://apache.webthing.com/svn/apache/filters/mod_xml2enc.h apxs2 -aic -I/usr/include/libxml2 ./mod_xml2enc.c cd ~ rm -rfd ~/modbuild/ sudo service apache2 restart