I need to run a squid server in order to code and test another program against a proxy. So I downloaded Squid for Windows, configured for running without authentication and everything works. So far so good.

Now I need to setup authentication, and I just need a simple one. First I thought about using the MySQL authentication program - but! I can't find the squid_db_auth compiled for Windows. Does anyone know where to find it, or what other simple authentication do I have for Squid? If I could just configure a login and password that would do the trick.

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

I finally figured out this. Squid comes with build in basic authentication, and it is easily configured - when you know how to!

First you need a htpasswd file to use with ncsa authentication. On windows it is easyly configured on this page. I only needed at user called test with the password test, so no problem for me giving that to a third party.

Then I found out, googling different pages, that the following addition to squid.conf does the rest.

# In my squid.conf this is the very first uncommented  line.
auth_param basic program c:/squid/libexec/ncsa_auth.exe c:/squid/etc/passwd

# The following needs to be in that order and I placed it right after
#  the line 'acl CONNECT method CONNECT'
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users

I made no other changes to the default config file.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.