I'm protecting a few different directories with LDAP. My problem is that you have to log into each directory separately even though it's the same user for almost all of them. Here's the pertinent part of my httpd.conf:
LoadModule vhost_alias_module /usr/lib/apache2/modules/mod_vhost_alias.so
<Directory /var/www/wiki>
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwords
Require user galapagos
</Directory>
<Directory /var/www/staging>
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwords
Require user galapagos
</Directory>
<Directory /var/www/mantis>
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwords
Require user galapagos
</Directory>
<Directory /home/jason/projects>
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwords
Require user jason
</Directory>
How do I factor out all the parts that are the same and only require galapagos' login once?
Since there were no great answers here, my answer was to buy the book LDAP System Administration.
What have you tried to do? Your conf file appears to use local (to the server) accounts, not LDAP accounts.
Searching for "apache with ldap authentication" on your favorite search engine should get you some reasonable results. (I'd recommend that you specify the flavor of LDAP that you're using, especially if it's Active Directory.) I see:
Further, it actually looks like you actually want to learn how to make a session persistent and/or cache credentials. Try searching using those terms.
If the directories are on different virtual hosts you will have to use NTLM authentication to get SSO functionality.