Page 1 of 1

Error httpd24-httpd - The alias provider has already be registered previously...

Posted: 2018/10/29 11:52:21
by leobq
Hi, I am using a Centos 6.10 VM 64bit, and I have installed the following packages with the aim of having concurrent istances of httpd 2.2 and httpd 2.4, as it seemed the easyest way to use Centos 6 instead of Centos 7.5.
It seemed all smooth until I got this error:

#service httpd24-httpd start
Starting httpd: AH00526: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.d/httpd.04.auth.conf:
The alias provider NAME1 has already be registered previously as either a base provider or an alias provider.

As I wanted to create the clearest env, I just 'yum removed' httpd-2.2.15-69 and httpd-tools
leaving only these packages:
httpd24-apr-1.5.1-1; httpd24-libnghttp2-1.7.1-1; httpd24-mod_ldap-2.4.27-8; httpd24-httpd-tools-2.4.27-8
httpd24-apr-util-ldap-1.5.4-1; httpd24-apr-util-1.5.4-1; httpd24-1.1-18; httpd24-httpd-2.4.27-8

Then the most significant parts of my configuration are:

Include conf.modules.d/*.conf
Include conf.d/httpd.02.server.conf
Include conf.d/httpd.auth.conf
Include conf.d/httpd.virtualhost.conf
IncludeOptional conf.d/*.conf

(As described in ... _core.html)
<AuthnProviderAlias ldap NAME1>
AuthLDAPUrl "ldap://SVR1:PORT/" "NONE"
AuthLDAPBindDN "...."
AuthLDAPBindPassword "...."

<AuthnProviderAlias ldap NAME2>
AuthLDAPUrl "ldap://SVR2:PORT/OU=xx,DC=domain?sAMAccountName?sub" "NONE"
AuthLDAPBindDN "...."
AuthLDAPBindPassword "...."

<AuthzProviderAlias ldap-attribute ATTRIBUTE "attribute='XXXXX'">
AuthLDAPUrl "ldap://SVR1:PORT/" "NONE"
AuthLDAPBindDN "...."
AuthLDAPBindPassword "...."

<AuthzProviderAlias ldap-user USERS "test1 test2">
AuthLDAPUrl "ldap://SVR2:PORT/OU=xx,DC=domain?sAMAccountName?sub" "NONE"
AuthLDAPBindDN "...."
AuthLDAPBindPassword "...."

<Location />
AuthBasicAuthoritative on
AuthBasicProvider NAME1 NAME2
AuthType Basic
AuthName "My Auth Name"
require USERS

Because of AuthnProviderAlias, AuthzProviderAlias, AuthBasicProvider
I'm using respectively conf.modules.d/
00-base.conf:LoadModule authn_core_module modules/
00-base.conf:LoadModule authz_core_module modules/
00-base.conf:LoadModule auth_basic_module modules/

About this module...
LoadModule authnz_ldap_module modules/ I get the following error removing it
Starting httpd: AH00526: Syntax error on line 2 of /opt/rh/httpd24/root/etc/httpd/conf.d/httpd.04.auth.conf:
Invalid command 'AuthLDAPUrl', perhaps misspelled or defined by a module not included in the server configuration

Going further I was looking at mod_authn_core.c in which is defined the following...

/* Look up the alias provider to make sure that it hasn't already been registered. */
provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP, provider_alias,
if (provider) {
return apr_pstrcat(cmd->pool, "The alias provider ", provider_alias,
" has already be registered previously as either a base provider or an alias provider.",

Then I stopped investigating here...

Thank you for any help!