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

Issues related to applications and software problems
Post Reply
leobq
Posts: 1
Joined: 2018/10/26 14:03:47

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

Post by leobq » 2018/10/29 11:52:21

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
httpd24-runtime-1.1-18

Then the most significant parts of my configuration are:
(/opt/rh/httpd24/root/etc/httpd)

conf/httpd.conf:
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 https://httpd.apache.org/docs/2.4/mod/m ... _core.html)
httpd.04.auth.conf:
--------------------------------------------------------------------
<AuthnProviderAlias ldap NAME1>
AuthLDAPUrl "ldap://SVR1:PORT/dc=domain.com?sAMAccountName?sub" "NONE"
AuthLDAPBindDN "...."
AuthLDAPBindPassword "...."
</AuthnProviderAlias>

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

<AuthzProviderAlias ldap-attribute ATTRIBUTE "attribute='XXXXX'">
AuthLDAPUrl "ldap://SVR1:PORT/dc=domain.com?sAMAccountName?sub" "NONE"
AuthLDAPBindDN "...."
AuthLDAPBindPassword "...."
</AuthzProviderAlias>

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

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

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

About this module...
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so 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,
AUTHN_PROVIDER_VERSION);
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.",
NULL);
}


Then I stopped investigating here...

Thank you for any help!

Bye,
Leo

Post Reply

Return to “CentOS 6 - Software Support”