On Tue, 21 Oct 2003, Boniforti Flavio wrote:
> Henrik Nordstrom wrote:
>
> > Then you can use the cache_peer login= directive to have the
> > authentication credentials forwarded to that PHP page.
>
> Can you tell me step-by-step how to get that value in PHP?
0. You must be using Squid-3
1. Squid must be running as a reverse-proxy with authentication enabled,
in front of your web server where this PHP script resides.
2. Configure Squid to forward the requests using the cache_peer directive
in squid.conf using the originserver and login= cache_peer options.
3. Make the PHP script read the Basic authentication user name from the
request. See the PHP manual "Chapter 17. HTTP authentication
with PHP" for details on how to do this.
Alternatively, you can use a redirector helper to add the login details to
the request by rewriting the URL to
http://user:password@server/path/to/page.php (this approach works in all
Squid versions)
Regards
Henrik
Received on Tue Oct 21 2003 - 02:19:59 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:20:33 MST