1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Apache and LDAP Authentication

Discussion in 'Apache' started by thepaymentsman, Jan 16, 2014.

  1. #1
    Hi,

    I am running apache currently on my QNAP server, and have enabled webserver and LDAP. We have set up users on LDAP. I have created a landing page for access from the internet. I want to configure Apache to authenticate the users using LDAP before granting access to the landing directory.

    I have started this with the apache configuration below:

    My apache config file -

    LogLevel debug
    CustomLog "logs/access_log" combined
    ErrorLog "logs/error_log"
    LoadModule ldap_module modules/mod_ldap.so
    LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
    ServerName MyServer
    LDAPTrustedMode NONE
    LDAPVerifyServerCert Off

    SetHandler server-status
    Order Deny,Allow
    Deny from all
    AuthType Basic
    AuthName "MyServer"
    AuthBasicProvider ldap
    AuthLDAPBindDN cn=admin,dc=myserver,dc=com
    AuthLDAPBindPassword serverPW
    AuthLDAPCompareDNOnServer Off
    AuthLDAPURL
    ldap://MyServer:389/ou=people,dc=MyServer,dc=comuid,ou=people,dc=MyServer,dc=com?sub NONE
    AuthzLDAPAuthoritative off
    AuthUserFile /dev/null
    Require valid-user
    Satisfy any


    When I access my page, I get the authentication prompt. But when I enter my LDAP login and password, I get thrown out of the system with the error:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, admin@NAS and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Looks like my apache configuration is a problem as I am able access my LDAP and everything with LDAP seems to be working fine except Apache configuration to authenticate against LDAP.

    Thanks.
     
    thepaymentsman, Jan 16, 2014 IP