7.4 C
Amsterdam
Friday, January 22, 2021

AH00111: Config variable ${APACHE_RUN_DIR} is not defined

Must read

Please Donate

Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

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:


root@www:/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

Solutions:


Method 1

You should use the apachectl or apache2ctl script to start apache

root@osradar:~$ sudo apache2ctl startInvoking 'systemctl start apache2'.
root@osradar:~$ sudo apache2ctl stop

Method 2

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

root@osradar:~$ source /etc/apache2/envvars
root@osradar:/home/lautturi$ /usr/sbin/apache2 -V
Server version: Apache/2.4.38-3+deb10u3

if this works for you please share this solution!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

-

Latest article

x