構成変数$ {APACHE_RUN_DIR}が定義されていません



Config Variable Is Not Defined



今日kaliをアップグレードすると、Apacheの起動に失敗しました。問題は次のとおりです。

root @ xxxxx:〜#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 or: root@xxxxx:/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