# HG changeset patch # User Paul Boddie # Date 1460932294 -7200 # Node ID ebf7feb50352ac8b256383d72476fe97d0f0ec20 # Parent 0f4dbb14ce2a6dc876f3dc70d4c573e452536e84 Adjust Apache authentication directives according to the user database setting. diff -r 0f4dbb14ce2a -r ebf7feb50352 conf/apache/imip-agent.conf --- a/conf/apache/imip-agent.conf Sun Apr 17 23:55:56 2016 +0200 +++ b/conf/apache/imip-agent.conf Mon Apr 18 00:31:34 2016 +0200 @@ -9,11 +9,11 @@ # Choose one of the sections below. # LDAP authentication... - ##AuthBasicProvider ldap - ##AuthLDAPUrl "$LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub" + #${APACHE_LDAP_ENABLE}AuthBasicProvider ldap + #${APACHE_LDAP_ENABLE}AuthLDAPUrl "$LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub" # Simple file-based authentication... - ##AuthUserFile /var/www/imip-agent/users + #${APACHE_SIMPLE_ENABLE}AuthUserFile /var/www/imip-agent/users # Access policy. Where users and groups are involved, specific users or # groups can be required here. diff -r 0f4dbb14ce2a -r ebf7feb50352 conf/apache/imip-manager.conf --- a/conf/apache/imip-manager.conf Sun Apr 17 23:55:56 2016 +0200 +++ b/conf/apache/imip-manager.conf Mon Apr 18 00:31:34 2016 +0200 @@ -8,11 +8,11 @@ # Choose one of the sections below. # LDAP authentication... - #AuthBasicProvider ldap - #AuthLDAPUrl "$LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub" + ${APACHE_LDAP_ENABLE}AuthBasicProvider ldap + ${APACHE_LDAP_ENABLE}AuthLDAPUrl "$LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub" # Simple file-based authentication... - AuthUserFile /var/www/imip-agent/users + ${APACHE_SIMPLE_ENABLE}AuthUserFile /var/www/imip-agent/users # Access policy. Where users and groups are involved, specific users or # groups can be required here. diff -r 0f4dbb14ce2a -r ebf7feb50352 conf/configure.example --- a/conf/configure.example Sun Apr 17 23:55:56 2016 +0200 +++ b/conf/configure.example Mon Apr 18 00:31:34 2016 +0200 @@ -78,11 +78,20 @@ fi fi +if [ "$USER_DATABASE" = 'Simple' ]; then + APACHE_LDAP_ENABLE=# + APACHE_SIMPLE_ENABLE= +else + APACHE_LDAP_ENABLE= + APACHE_SIMPLE_ENABLE=# +fi + # Substituted variables. SUBSTITUTED='$MAIL_DOMAIN $MAIL_DOMAIN_QUOTED \ $MAILBOX_DELIVERY_OPTIONS $MAILBOX_DELIVERY_GROUP \ + $APACHE_LDAP_ENABLE $APACHE_SIMPLE_ENABLE \ $POSTFIX_LOCAL_SYSTEM_ENABLE \ $LDAP_SCHEME $LDAP_HOST $LDAP_PORT $LDAP_BASE_DN $LDAP_SERVICE_BIND_DN $LDAP_SERVICE_PASSWORD'