Problem scenario
Your website is not working. When you browse to the login page, the browser loads forever. There seems to be a problem with the web server itself.
On the back end, you run this command from the operating system's command line:
netstat -anlp | apache2
It produces output like this:
"
[Sun Aug 06 21:03:22.088579 2017] [core:warn] [pid 30144] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sun Aug 06 21:03:22.088682 2017] [core:warn] [pid 30144] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Sun Aug 06 21:03:22.088697 2017] [core:warn] [pid 30144] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Sun Aug 06 21:03:22.088701 2017] [core:warn] [pid 30144] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Sun Aug 06 21:03:22.088712 2017] [core:warn] [pid 30144] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sun Aug 06 21:03:22.099496 2017] [core:warn] [pid 30144] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sun Aug 06 21:03:22.099764 2017] [core:warn] [pid 30144] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sun Aug 06 21:03:22.099775 2017] [core:warn] [pid 30144] 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 should you do to fix this?
Solution
Did you really mean to pipe the output of "netstat -anlp" to "apache2"? Kindly note that Linux administrators who are prone to mistyping commands (i.e., omitting the word "grep") may also mistype the URL or IP address in the web browser. Make sure you typed in the correct IP address in your web browser. To find the correct IP address, run this command:
curl icanhazip.com
The result should be the IP address in the web browser. An incorrectly typed IP address in a web browser can make a web page appear to load forever.