We will briefly explain how to setup this configuration using multiple authentication methods.In order to view the same thing, using multiple authentication systems, we could use a symbolic link from one directory to the other. When accessing the symbolic link, you actually see the content of the directory it is linked to. The advantage of that symbolic link is that you can use a different authentication system for viewing the same content.In our example we made a directory called “basic” and a symbolic link called “shibboleth” which is linked to the directory “basic”.ls -al:drwxrwxr-x 3 user group 4096 2005-10-28 09:36 .drwxrwxr-x 12 root root 4096 2005-10-27 15:59 ..drwxr-xr-x 2 user group 4096 2005-10-25 11:41 basic-rw-r–r– 1 user group 42 2005-10-24 14:46 .htaccesslrwxrwxrwx 1 user group 5 2005-10-24 12:09 shibboleth -> basicAll the content will be placed in the directory “basic”. Now we need to protect both directorys, one with Shibboleth, the other with Basic Authentication.Therefore you need to add two <Directory> or <Location> blocks in the apache configuration. We edited mod_shib.conf that is included by httpd.conf.The first block will protect the symbolic link “shibboleth” with Shibboleth. The second block will protect the directory “basic” with Basic Authentication. mod_shib.conf:<Location /secureKUL/shibboleth> AuthType shibboleth ShibRequireSession On require valid-user</Location><Location /secureKUL/basic> AuthType Basic AuthName “user/password = demo/demo” AuthUserFile /path/to/.htpasswd require user demo</Location>We used a password file for our Basic authentication, but you could also make use of Mysql, LDAP, … authentication. Either way, the REMOTE_USER will be filled in when authentication was successfull. See our demo! Note:It is not possible to make the same configuration with .htaccess files. There are several things that prohibit the configuration with .htaccess files:You cannot place a .htaccess file inside the directory where the symbolic link is pointing to. The same directives used in that directory will be applied when accessing the directory through the symbolic link.You cannot place a .htaccess file in the parent directory because you cannot use <Directory> or <Location> blocks inside a .htaccess file. You can only use <Files> blocks inside a .htaccess file.
via AAI K.U.Leuven.