1

My apache config:

    DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                IndexStyleSheet "/css/style.css"
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>

        <Location />
                AuthName "AUTH"
                AuthType Basic
                AuthBasicProvider ldap
                AuthzLDAPAuthoritative On
                AuthLDAPBindDN "cn=write,cn=auth,ou=user,dc=example,dc=com"
                AuthLDAPBindPassword password
                AuthLDAPURL "ldap://localhost/ou=user,dc=example,dc=com?uid"
                AuthLDAPGroupAttributeIsDN Off
                Require valid-user
        </Location>
<Directory /var/www/dir>
                RewriteEngine On
                RewriteCond %{LA-U:REMOTE_USER} (.+)
                RewriteCond %{LA-U:REMOTE_USER} !(adm1|adm2|adm3)
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteRule (.*) /~%{LA-U:REMOTE_USER}/

                Options Indexes FollowSymLinks -MultiViews
                AllowOverride AuthConfig
                Order allow,deny
                Allow from all
            </Directory>

My ldap_userdir config:

<IfModule mod_ldap_userdir.c>
                LDAPUserDir pub
                LDAPUserDirServerURL ldap://localhost/ou%3Duser%2Cdc%3Dexample%2Cdc%3Dcom??sub?(&(uid=%25u)(objectClass=inetOrgPerson))
                LDAPUserDirDNInfo cn=write,cn=auth,ou=user,dc=example,dc=pl password
(objectClass=inetOrgPerson))"
                <Directory /var/www/dir/*/pub>
                AllowOverride FileInfo AuthConfig Limit Indexes
                Options -MultiViews Indexes FollowSymLinks IncludesNoExec
                <Limit GET POST OPTIONS>
                        Order allow,deny
                        Allow from all
                </Limit>
                <LimitExcept GET POST OPTIONS>
                        Order deny,allow
                        Deny from all
                </LimitExcept>
                </Directory>
</IfModule>

My directories structure:

/var/www/
        index.html
        dir/
                  user1/pub/*
                  user2/pub/*

Ldap Authentication working properly.

when i get my domain: https://domain.example.com

then I see my index.html correctly, I click on the link "dir" and rewrite mod into action by redirecting me to a htts://....../dir where I can see all directories and not the contents of the user's home directory.

LINK TO REDIRECT LOG FILE

Where is my mistake?

Martin
  • 11
  • 1

0 Answers0