AH00111: Config variable ${APACHE_RUN_DIR} is not defined

0
283

While configuring my Apache on Debian10, I was confronted with this error bellow, this issue also can happen in all Debian based Servers like Ubuntu Systems.

.

Symption:

[email protected]:/etc/ssl/osradar# apache2   -t
[Fri Feb 07 14:47:18.945268 2020] [core:warn] [pid 21383] 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

Solution:

Method 1

You should use the apachectl or apache2ctl script to start apache

[email protected]:~$ sudo apache2ctl startInvoking 'systemctl start apache2'. 
[email protected]:~$ sudo apache2ctl stop

Method 2

The variable APACHE_RUN_DIR is defined in /etc/apache2/envvars. load (source) the environment before runningapache2`.

[email protected]:~$ source /etc/apache2/envvars 
[email protected]:/home/lautturi$ /usr/sbin/apache2 -V
Server version: Apache/2.4.38-3+deb10u3

if this works for you please share this solution!

LEAVE A REPLY

Please enter your comment!
Please enter your name here