Password protected directory asking for password twice

RedhatTux

Joined: 2009-09-22
Posts: 10
Posted: Mon, 2009-10-19 08:13

I've put password protection on my gallery2 folder, it works but it keeps asking for the password twice. Why does it do this?

<Directory "/var/www/html/gallery2/">
Options +SymLinksIfOwnerMatch
AllowOverride None
AuthType Basic
AuthBasicProvider ldap
AuthName "Login with your Network Username and Password"
AuthLDAPURL "ldap://ldap.domain.com:332/ou=xxx, ou=xxx, ou=xxx, o=DOT?uid"
Require valid-user
</Directory>

Could one of the .htaccess files be causing the problem? There are a few in the folders within gallery2. I've not set any up myself though.

 
RedhatTux

Joined: 2009-09-22
Posts: 10
Posted: Mon, 2009-10-19 11:10

Seems to be working now. I just ran the installation script again. Not sure why that fixed it, but at least it's working properly now.

 
RedhatTux

Joined: 2009-09-22
Posts: 10
Posted: Wed, 2009-10-21 21:34

Still got a problem.

I've got an alias for my server, so for example I could type in tuxserver/gallery2 and come to my gallery server. Now I'm getting a password box coming up, and I login once, and it works.

Now if i go to tuxserver.mydomain.com I come to my index page, and then I click on my gallery and it asks for the password twice.

In my config.php file it has the server alias down. Now if i change that to tuxserver.mydomain.com and browse to tuxserver.mydomain.com I come to my index page, I click on the gallery link and it asks me for my password once. Brilliant but when I go back to using my server alias it asks for the password twice.

So what I want to know is can I have both the full DNS path and server alias in my config file? It's not a major problem but it is slightly annoying.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2009-10-21 22:39
Quote:
So what I want to know is can I have both the full DNS path and server alias in my config file? It's not a major problem but it is slightly annoying.

What config file? config.php for Gallery? If so, no.

Why are you trying to use authentication through HTTP Auth and password protected albums?

You should really only access Gallery through 1 URL, but if you must access from a local path and a "www" path, make sure that the baseUri setting in config.php doesn't list anything.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here