环境变量的Apache错误(Ubuntu)

leo*_*lma 4 apache environment-variables ubuntu-12.04

我的操作系统是Ubuntu 12.04,我分别安装了Apache,Php和Mysql。我从来没有遇到过问题,但是在Ubuntu更新之后,当我尝试访问Web服务器上的php文件时,总是会收到“ 404 Not Found”错误。

当我在控制台上写“ apache2 -S”时,得到以下信息:

[Sat Feb 22 16:15:16.983766 2014] [core:warn] [pid 4475] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sat Feb 22 16:15:16.983871 2014] [core:warn] [pid 4475] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Sat Feb 22 16:15:16.983914 2014] [core:warn] [pid 4475] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Sat Feb 22 16:15:16.983936 2014] [core:warn] [pid 4475] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Sat Feb 22 16:15:16.983966 2014] [core:warn] [pid 4475] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Feb 22 16:15:16.987930 2014] [core:warn] [pid 4475:tid 139974428579648] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
[Sat Feb 22 16:15:16.988259 2014] [core:warn] [pid 4475:tid 139974428579648] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Feb 22 16:15:16.988433 2014] [core:warn] [pid 4475:tid 139974428579648] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Feb 22 16:15:16.988456 2014] [core:warn] [pid 4475:tid 139974428579648] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 75 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} 
Run Code Online (Sandbox Code Playgroud)

谁能帮我吗?

Key*_*Lay 5

通过阅读此错误页面,我推测所有这些都是环境变量,在运行apache2之前需要将其导出。显然,当您将它们作为“ service apache2 start”之类的服务运行时,这些文件会自动从/ ​​etc / apache2 / envvars中加载。另一个选择是使用apache2ctl启动它。