2

I have been setting up a blog/cloud server on Ubuntu 16.04 with Apache 2.4.18 and after rebooting my machine, came across this error.

[Wed Aug 03 01:04:41.468928 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Wed Aug 03 01:04:41.468964 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Wed Aug 03 01:04:41.468976 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Wed Aug 03 01:04:41.468979 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Wed Aug 03 01:04:41.468987 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Aug 03 01:04:41.507710 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
[Wed Aug 03 01:04:41.507998 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Aug 03 01:04:41.508128 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Aug 03 01:04:41.508138 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Aug 03 01:04:41.508284 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Wed Aug 03 01:04:41.508292 2016] [core:warn] [pid 3191] AH00111: Config variable ${APACHE_LOG_DIR} is not defined

AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

Line 74 of /etc/apache2/apache.conf:

Mutex file:${APACHE_LOCK_DIR} default

What would be the easiest way to fix this short of reinstalling Apache?

2
  • You need to post your config files, and probably also relevant directory listings showing permissions
    – Colt
    Aug 3, 2016 at 0:04
  • It turns out just doing "sudo apt remove apache2" and "sudo apt install apache2" fixed it. I'm assuming it was a problem with with my apache2.conf that I didn't see. Aug 3, 2016 at 10:31

1 Answer 1

1

Debian like distros rely on a file called "envvars" in which they put lots of variables.

Apache HTTPD compiled from source does include the file but it does not place so many variables there by default.

If you are trying to start Apache through other means than distros default or for any particular reason that file has gone missing, all those variables will end up undefined and therefore Apache HTTPD will not start due to syntax errors.

According to ubuntu.packages.com it is inside /etc/apache2

You can check it at: http://packages.ubuntu.com/search?searchon=contents&keywords=envvars&mode=exactfilename&suite=xenial&arch=any

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .