1

I installed Apache 1.3, and Apache 2.2 on one system with different ports (444, 445). I used Apache Authentication info of 444 for both. When I want to go from port 444 to 445, Browser ask me user/password again. I want to share the session authentication info between two apache. It means, if I enter password for 444, it doesn't ask me the password again and use 444 session. I used below .htaccess for folder of second apache (444):

AuthName "Restricted"
AuthType Basic
AuthUserFile  /var/Apache444/users
AuthGroupFile /etc/Apache444/groups
require group admin

1 Answers1

1

I think the browser will identify server:444 and server:445 as two different servers and will not send the Authentication credentials.

Check your HTTP requests headers for something like:

Authorization:Basic HERESOMEBASE64ENCODEDCHARS=

Usually the browser send this user+password on every request, and the server checks the validity of the credentials for each request (in clear text, just base64 encoded, so, yes, should only be used with SSL in a perfect world). The important part is that the session is not managed on the server side, there is no session.

That means the browsers stores theses credentials in a cache and automatically decides to add theses credentials when a request is made to the same server.

If the browser does not see your two apache servers, on two ports, as the same server, it will never sends the credentials... never.

regilero
  • 1,470
  • 1
  • 9
  • 14