8

I installed apache2 in my ubutu server 20.04, but when i troubleshoot the syntax by sudo apache2 -t, it gives me the following errro:

[Sun Apr 17 08:43:12.116347 2022] [core:warn] [pid 34462] 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 

but the apache2 is running and active status.

2 Answers 2

13

Running the following command fixed my problem:

 source /etc/apache2/envvars 
Sign up to request clarification or add additional context in comments.

Comments

3

apache2 is deprecated. Use apachectl -t.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.