Actualizado a Ubuntu 13.10: Apache no puede iniciarse


37

Actualicé a Ubuntu 13.10 (desde Ubuntu 13.04) el fin de semana pasado, y ahora Apache no puede comenzar. Funcionó perfectamente bien hasta la actualización, y yo mismo no he cambiado nada.

Cuando ejecuté un reinicio, esto es lo que obtengo

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

Entonces, creé el directorio, y luego obtengo esto:

 * 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.

¡Gracias!


¿Has realizado modificaciones en el /etc/apache2/apache2.confarchivo?
Dan

No, no lo he hecho.
0R10N

Respuestas:


71

Reemplazando esta línea

LockFile ${APACHE_LOCK_DIR}/accept.lock

Con este

Mutex file:${APACHE_LOCK_DIR} default

en /etc/apache2/apache2.confresuelto el problema.

Información adicional: se produce porque la actualización también actualiza su PHP. Si actualiza de PHP5.3.X a PHP5.5.X, y elige conservar sus archivos modificados, encontrará este error.


1
¡Excelente! Eso genera dos votos a favor: D
Camilo Martin el

Tengo una situación muy similar con 0R10N. Excepto que usé 14.04. Exactamente el mismo error y exactamente lo que hice (creando el conf.d) antes de buscar en google y aterrizar en esta página. He aplicado este, PERO Apache arrojó otro error. AH00526: Syntax error on line 201 of /etc/apache2/apache2.conf: - Line 201 in my file is the opening tag for Directory directives
GaryP

9

Deberá instalar mod_xml2enc con estos pasos:

Asegúrate de tener mod_proxy:

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

Para 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

1
En mi caso, tuve que instalar otros paquetes también sudo apt-get install libxml2 libxml2-dev apache2-devy ejecutar apxs2los rmcomandos y sudotambién con ellos
oskarnrk
Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.