Apache(2.4.7) LDAP URL authentication on ubuntu 14.04

10,669

According to Apache documentation:

"Directory-path is either the full path to a directory, or a wild-card string using Unix shell-style matching. In a wild-card string, ? matches any single character, and * matches any sequences of characters."

If mediawiki directory full path is /var/www/html/mediawiki try:

  <Directory /var/www/html/mediawiki>  

If not, verify if you have forgot .htaccess file

Share:
10,669

Related videos on Youtube

phwd
Author by

phwd

Updated on September 18, 2022

Comments

  • phwd
    phwd over 1 year

    The following LDAP URL authentication is NOT working for mediawiki on ubuntu 14.04 LTS server, which is working on ubuntu 9.10 server.

    cat /etc/apache2/sites-available/global.conf

    <Directory /mediawiki>
            Options +FollowSymLinks
            AllowOverride all
            order allow,deny
            allow from all
    
    
    AuthType Basic
                AuthName "Web Site Authentication: Login with your user id"
                AuthBasicProvider ldap
                #AuthzLDAPAuthoritative on
                AuthLDAPURL "ldap://192.168.1.3:389/dc=mydomain,dc=net?uid"
                AuthLDAPBindDN "cn=admin,dc=mydomain,dc=net"
                AuthLDAPBindPassword secret
                Require valid-user
    </Directory>
    

    Not working in the sense it's not prompting for authentication at all, just allows to access. No errors. There are many changes in Ubuntu 14.04, such as web root directory changed to /var/www/html in apache 2.4, AuthzLDAPAuthoritative is deprecated(that's why commented)....

    If I paste the same code in 000-defaults replacing /mediawiki with /var/www/html then it prompts for authentication for accessing http://192.168.1.3. But no effect for http://192.168.1.3/mediawiki

    Am I missing anything in apache 2.4.7?. I'm confused, anybody has any idea?

    • phwd
      phwd almost 10 years
      The browser cache of one page which is already successfully authenticated affects the other site by not asking for authentication again. It's working now, full path is the key(and clearing the browser cache of other successfully authenticated site).
  • phwd
    phwd almost 10 years
    I already tried it and it's now `/var/www/html/mediawiki' but the result is same. There is no .htaccess file under mediawiki.
  • phwd
    phwd almost 10 years
    Let me change the post with the complete path.
  • phwd
    phwd almost 10 years
    I tried with the full path /var/www/html/mediawiki before but replaced order allow,deny & allow from all with Require all granted to completely use 2.4 features. This caused apache not to show authentication box. It's working now full path is the key though.
  • phwd
    phwd almost 10 years
    Still wanted to know why it's not working with Require all granted. Any idea?
  • Lety
    Lety almost 10 years
    Allow and deny directive controls which hosts can or can't access an area of the server, Require tests whether an authenticated user is authorized according to a particular authorization provider and the specified restrictions. Require all granted means access is allowed unconditionally. If you put it before ldap directive maybe overrides authentication, let see Beyond just authorization