2

When I run apache2 from command line (running the command, instead of the service), I've got this:

[Thu Mar 13 12:18:05.594522 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Thu Mar 13 12:18:05.594732 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Thu Mar 13 12:18:05.594807 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Thu Mar 13 12:18:05.594867 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Thu Mar 13 12:18:05.594934 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Thu Mar 13 12:18:05.617353 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Thu Mar 13 12:18:05.617809 2014] [core:warn] [pid 9268] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Thu Mar 13 12:18:05.617895 2014] [core:warn] [pid 9268] 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}

the line 74 is:

Mutex file:${APACHE_LOCK_DIR} default

I've updated Xubuntu from 13.04 to 13.10 and it has Apache/2.4.6

  • Do you have the file /etc/apache2/envvars? If so, what is in it? – Ladadadada May 29 '14 at 11:48
  • @Ladadadada content of that file pastebin.com/sFt3vnVM – jcubic May 29 '14 at 12:31
  • 1
    In my case I was getting the error because I didn't realize that file:/var/log/apache/mutex was a directory and not a file written by apache. As soon as I created an empty, writable directory of that name, all was well. – ericx Mar 23 '16 at 20:19
  • Are you running with enough permissions? It is possible that some enabled-sites conf file is wrong. – Efren May 27 '16 at 1:51
0

I think you should use sudo /etc/init.d/apache2 because default call to bin does not work right.

Details below:

On loaded test page, it says "The configuration system is fully documented in /usr/share/doc/apache2/README.Debian.gz." -> in that file it's written "Due to the use of environment variables, apache2 needs to be started/stopped with '/etc/init.d/apache2', apachectl, or apache2ctl. Calling '/usr/bin/apache2' directly will not work with the default configuration."

On my machine apache2ctl restart apachectl restart says Could not reliably determine the server's fully qualified domain name ...., but /etc/init.d/apache2 restart works without questions.

0

This is expected, because apache2 is expecting some variables to be set in its environment. So, the correct ways to run apache2 are with your regular service control scripts (service or systemctl), or apache2ctl (apachectl).

-1

You should be able to start apache by using the service command:

service apache2 start

See for the same problem and a more detailed answer at https://lists.debian.org/debian-apache/2013/08/msg00053.html

  • 1
    Welcome to Server Fault! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – masegaloeh Oct 22 '14 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.