Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache forced logout?

I am running a LAMP server and when users access the server homepage I am using the Apache basic authentication to log them in. Is there a way to force the user to logout (or be logged out)? I tried the mod_session & mod_auth_form to no avail. The page I'm using is a mix of php/html. I am self taught on all of my programming skills so I lack the depth to get a workable solution. Thanks.

like image 626
EnterUserNameHere Avatar asked Mar 08 '26 18:03

EnterUserNameHere


1 Answers

The short answer is you can't.

Check these sources:

No correct way exists, not even one that's consistent across browsers.

https://stackoverflow.com/a/449914/3960852


Consequently, the answer to this question is, you can't. Sorry.

https://stackoverflow.com/a/1163876/3960852


However, there are certain ways for CERTAIN browsers. If you plan to only support a specific browser, which is a valid course of action, there are hackish ways of accomplishing it.

https://stackoverflow.com/a/36176917/3960852


However, the jury is out. If you want to log out HTTP authenticated users with extensive browser support, you're out of luck.

like image 132
Kenny Worden Avatar answered Mar 10 '26 08:03

Kenny Worden



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!