"Could not locate Apache configuration file" Error When Attempting to Install the Crowd Apache Connector on Ubuntu Linux
Symptoms
After running ./configure in Step 3 of this guide: 2018-04-24_10-55-23_Installing the Crowd Apache Connector on Ubuntu Linux , the following error message is thrown:
configure: error: Could not locate Apache configuration file
Cause
The configure.ac file in mod_authnz_crowd-2.0.2 has 3 hardcoded links to locate httpd.conf:
AC_CHECK_FILE([/usr/local/apache2/conf/httpd.conf], [HTTPD_CONF="/usr/local/apache2/conf/httpd.conf"], [
AC_CHECK_FILE([/etc/httpd/conf/httpd.conf], [HTTPD_CONF="/etc/httpd/conf/httpd.conf"], [
AC_CHECK_FILE([/etc/apache2/httpd.conf], [HTTPD_CONF="/etc/apache2/httpd.conf"], [
AC_MSG_ERROR([Could not locate Apache configuration file])
])
])
])
If httpd.conf is located in a different location, the error highlighted in this KB will be thrown.
This bug is recorded in our system as CWDAPACHE-35.
Workaround
Modify configure.ac
in mod_authnz_crowd
so that it includes your httpd.conf's location. Example:
AC_CHECK_FILE([/path/to/httpd.conf], [HTTPD_CONF="/path/to/httpd.conf"], [
AC_MSG_ERROR([Could not locate Apache configuration file])
])
Modify /path/to/httpd.conf to the location of your httpd.conf