0

I've use the code sudo apt-get install apache2. After that I've tried to open it and it gave me this

[Thu Jan 26 11:39:14.983776 2017] [core:warn] [pid 13237] 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}

What can I do?

Matei
  • 29

1 Answers1

1

In order to start apache, you need to run one of the following commands:

sudo apache2ctl start
sudo service apache2 start
sudo systemctl start apache2

Those commands will load environment variables. Running apache2 by itself will not work as you will be missing needed steps to run apache.

Dan
  • 13,119
  • I've used the first code and it showed me this AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message httpd (pid 1460) already running – Matei Jan 26 '17 at 13:39
  • @Matei The fist part is just a warning; check the following Q/A for a fix: http://askubuntu.com/questions/256013/apache-error-could-not-reliably-determine-the-servers-fully-qualified-domain-n. While the last part httpd (pid 1460) already runningis saying that Apache is already started. – Dan Jan 26 '17 at 14:46