Config variable ${APACHE_RUN_DIR} is not defined

apache启动报错

今天升级kali 导致apache 无法启动,问题如下:

root@kali:~# apache2 -k start

[Sat Jan 21 21:01:16.273933 2017] [core:warn] [pid 3248] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
或:
root@kali:/etc/apache2# apache2 -k start
[Sat Jan 21 22:05:56.705639 2017] [core:warn] [pid 10577] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Sat Jan 21 22:05:56.705819 2017] [core:warn] [pid 10577] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Sat Jan 21 22:05:56.705866 2017] [core:warn] [pid 10577] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Sat Jan 21 22:05:56.705919 2017] [core:warn] [pid 10577] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Jan 21 22:05:56.713958 2017] [core:warn] [pid 10577:tid 3073427200] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Jan 21 22:05:56.714454 2017] [core:warn] [pid 10577:tid 3073427200] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Jan 21 22:05:56.715159 2017] [core:warn] [pid 10577:tid 3073427200] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00543: apache2: bad user name ${APACHE_RUN_USER}

这是由于升级后apache 配置文件变化,没有导入新的apache 环境变量。

解决办法 :

source /etc/apache2/envvars

. /etc/apache2/envvars
  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值