apache2 -M 错误(参数文件中的无效互斥目录:${APACHE_LOCK_DIR})
当尝试列出apache2模块列表时出现错误。
$ apache2 -M
[Fri Jun 22 06:01:40.083534 2018] [core:warn] [pid 29273] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Fri Jun 22 06:01:40.083697 2018] [core:warn] [pid 29273] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Fri Jun 22 06:01:40.083749 2018] [core:warn] [pid 29273] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Jun 22 06:01:40.094040 2018] [core:warn] [pid 29273] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Jun 22 06:01:40.094497 2018] [proxy_html:notice] [pid 29273] AH01425: I18n support in mod_proxy_html requires mod_xml2enc. Without it, non-ASCII characters in proxied pages are likely to display incorrectly.
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
解决方案
source /etc/apache2/envvars
apache2 -V
sudo service apache2 restart