Using PHP to feed nginx auth_request
| From: | Lester Caine | Date: | Sat, 04 Apr 2020 23:23:32 +0000 |
| Subject: | Using PHP to feed nginx auth_request | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-327089@lists.php.net to get a copy of this message | ||
Can someone direct me to setting up nginx auth_request to play nicely with a php authentication script. I've got a script auth.php which is returning 200 or 401 depending on if the user is logged in or not, and the storage area is set up to use the auth.php result to block access to all of the images and pdf's, but I'm missing something ... The examples I have found have different ways of getting the auth.php to pick up the php-fpm instance. auth.php is running stand alone so I can test it, but not sure that it should be accessible anyway?
Alternatively is there a better way to block access to content based on the php user management ...
--
Lester Caine - G8HFL
-----------------------------
Contact - https://lsces.uk/wiki/Contact
L.S.Caine Electronic Services - https://lsces.uk
Model Engineers Digital Workshop - https://medw.uk
Rainbow Digital Media - https://rainbowdigitalmedia.uk