Como corrijo este erro de sintaxe:
AH00526: Syntax error on line 4 of /etc/apache2/envvars:
Invalid command 'unset', perhaps misspelled or defined by
a module not included in the server configuration
Antecedentes:
Recebo um erro em cada inicialização. Acho que está relacionado a esse problema, os mesmos erros:
Por que meu Apache não é trabalhando depois de atualizar para o Ubuntu 14.04?
$ cat apport.log.1
ERROR: apport (pid 2081) Tue Dec 16 10:09:06 2014: called for pid 22820, signal 11, core limit 0
ERROR: apport (pid 2081) Tue Dec 16 10:09:06 2014: executable: /usr/sbin/apache2 (command line "/usr/sbin/apache2 -k start")
ERROR: apport (pid 2081) Tue Dec 16 10:09:06 2014: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 2081) Tue Dec 16 10:09:09 2014: wrote report /var/crash/_usr_sbin_apache2.0.crash
Parece estranho que apenas uma pessoa mencione o arquivo de envios. Todos os vars indefinidos estão lá, então a questão que eu tenho é por que o envvars não é carregado ou está sendo carregado muito tarde?
eu adicionei
Include envvars
para /etc/apache2/apache2.conf@57 (antes da linha Mutex) e reran
/usr/sbin/apache2 -k start
como visto no log (eu sei que este método de iniciar o apache está obsoleto; não sei qual script chama isso (eu presumo /usr/sbin/apache2
), mas preciso de um suporte para parar de sufocá-lo porque está impedindo outros scripts subseqüentes de execução) e eu recebo um erro de sintaxe que eu acho que é a fonte do problema:
AH00526: Syntax error on line 4 of /etc/apache2/envvars:
Invalid command 'unset', perhaps misspelled or defined by
a module not included in the server configuration
Então, qual é a correção para esse erro de sintaxe?
Ubuntu 14.04 (3.13.0-43-genérico)
Versão do servidor: Apache / 2.4.7 (Ubuntu)
apport-cli -v 2.14.1
ATUALIZAÇÃO:
Aqui está o meu arquivo de envios. Eu acho tudo estoque.
# envvars - default environment variables for apache2ctl
# this won't be correct after changing uid
unset HOME
# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi
# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
# temporary state file location. This might be changed to /run in Wheezy+1
export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale
export LANG
## The command to get the status for 'apache2ctl status'.
## Some packages providing 'www-browser' need '--dump' instead of '-dump'.
#export APACHE_LYNX='www-browser -dump'
## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'
## If you would like to pass arguments to the web server, add them below
## to the APACHE_ARGUMENTS environment.
#export APACHE_ARGUMENTS=''
## Enable the debug mode for maintainer scripts.
## This will produce a verbose output on package installations of web server modules and web application
## installations which interact with Apache
#export APACHE2_MAINTSCRIPT_DEBUG=1