0

When I try to start Apache2 it fails then if I do

Apache2 -e Debug 

It comes up with these errors

[Thu Feb 09 09:46:08.244772 2017] [core:warn] [pid 16287] AH00111: Config variable ${APACHE_RUN_DIR} is not defined [Thu Feb 09 09:46:08.245358 2017] [core:warn] [pid 16287] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Thu Feb 09 09:46:08.245695 2017] [core:warn] [pid 16287] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Thu Feb 09 09:46:08.245764 2017] [core:warn] [pid 16287] 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} 

I have no idea what is wrong with the server as it used to work but then it stopped working after trying to install OpenLDAP.

I am running Ubuntu 16.04.1 and apache 2.4.18

I have also tried uninstalling and reinstalling apache but that does not work.

11
  • Well...what is line 74 in apache2.conf? Commented Feb 9, 2017 at 9:51
  • In order to get help, you need at least to post the file /etc/apache2/apache2.conf! Commented Feb 9, 2017 at 9:53
  • Sorry, Forgot to add, This is whats on line 74 'Mutex file:${APACHE_LOCK_DIR} default' Commented Feb 9, 2017 at 9:53
  • @HarryCameron What's in your /etc/apache2/envvars file? Commented Feb 9, 2017 at 10:04
  • What are you looking for precisely? Commented Feb 9, 2017 at 10:07

1 Answer 1

1

This variable may be set by init script - for example /etc/init.d/apache or /etc/systemd/system/httpd.service. Try starting it with init script.

Moreover, please write more about OS (which version) and Apache install (custom build or repository?).

5
  • It comes back ok but if I run service --status-all apache comes back as off Commented Feb 9, 2017 at 9:55
  • @HarryCameron this answer should do the trick. Starting apache2 using the binary usually won't work. Start it via sudo service apache2 start|stop|restart Commented Feb 9, 2017 at 9:58
  • Still doesn't work, I have tried all of the service apache2 options Commented Feb 9, 2017 at 9:59
  • I do not undestarnd - so it start without errors (via init script) but shut down immediately? If yes, post adequate error.log entries and check it via command: systemctl status httpd.service Commented Feb 9, 2017 at 10:04
  • The error.log file is empty Commented Feb 9, 2017 at 10:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.