环境变量的Apache错误(Ubuntu) [英] Apache error with environment variables (Ubuntu)
问题描述
我的操作系统是Ubuntu 12.04,我分别安装了Apache,Php和Mysql.我从来没有遇到过问题,但是在Ubuntu更新之后,当我尝试访问Web服务器上的php文件时,总会收到"404 Not Found"错误.
My OS is Ubuntu 12.04, I have installed separately Apache, Php and Mysql. I've never had a problem, but after an Ubuntu update I always get a "404 Not Found" error when I try to access a php file on my web server.
当我在控制台上写"apache2 -S"时,我得到了:
When I write "apache2 -S" on my console I get this:
[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}
有人可以帮我吗?
推荐答案
from reading this bug page, I surmised that all of these are environment variables that need to be exported before you can run apache2. Apparently these are loaded automatically from /etc/apache2/envvars when you run it as a service like "service apache2 start". Another option is to start it up with apache2ctl.
这篇关于环境变量的Apache错误(Ubuntu)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!