我知道未定义线程Apache2 配置变量,但这里的问题很可能与新创建用户的所有权/权限有关,请参阅线程底部以了解问题的假设。我在 Raspbian Jessie 中运行
sudo a2enmod headers
和
- 我
/etc/apache2/envvars
的和这里一样。 - 我成功地按照此处所述进行了自签名 SSL 证书;
openssl s_client -connect localhost:443
返回预期的输出。
我跑sudo apache2 -k graceful
了,但输出是
[Tue May 31 14:47:38.182913 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Mon Apr 21 17:36:38.019345 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Mon Apr 21 17:36:38.019370 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Mon Apr 21 17:36:38.019385 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Mon Apr 21 17:36:38.019414 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.028756 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.029032 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.029056 2016] [core:warn] [pid 5212] 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}
执行source /etc/apache2/envvars
并运行该命令仍然给出相同的输出。我不确定这个问题。
HBruijn 的建议
- 该命令
sudo service apache2 graceful
似乎有效;输出[OK] Reloading webserver: apache2
。那样行吗?那我应该检查什么?为什么原来的错误在那里? - 然后该命令
sudo apache2ctl graceful
再次返回一个空行。那样行吗?
为什么你会得到这样的输出apache2 -k graceful
?