参数文件中的无效Mutex目录:$ {APACHE_LOCK_DIR}

当我从命令行运行apache2(运行命令,而不是服务),我有这样的:

[Thu Mar 13 12:18:05.594522 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined [Thu Mar 13 12:18:05.594732 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_PID_FILE} is not defined [Thu Mar 13 12:18:05.594807 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_RUN_USER} is not defined [Thu Mar 13 12:18:05.594867 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined [Thu Mar 13 12:18:05.594934 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Thu Mar 13 12:18:05.617353 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Thu Mar 13 12:18:05.617809 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Thu Mar 13 12:18:05.617895 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOG_DIR} is not defined AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} 

线74是:

 Mutex file:${APACHE_LOCK_DIR} default 

我已经从13.04更新了Xubuntu到13.10,它有Apache / 2.4.6

这是预料之中的,因为apache2期望在其环境中设置一些variables。 所以,运行apache2的正确方法是使用常规服务控制脚本(service或systemctl)或apache2ctl。

你应该可以使用service命令启动apache:

 service apache2 start 

请参阅https://lists.debian.org/debian-apache/2013/08/msg00053.html上的相同问题和更详细的答案