A
A
a lion2015-03-20 17:16:51
Squid
a lion, 2015-03-20 17:16:51

I set up Squid, the browser asks for login and password all the time, how to fix it?

Installed ubuntu with squid3 on Amazon ec2, configured the latter:

sudo nano /etc/squid3/squid.conf
        http_port 8888
        # And finally deny all other access to this proxy
        auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/internet_users
        auth_param basic children 5
        auth_param basic realm =PROXY=
        auth_param basic credentialsttl 2 hours
        acl internet_users proxy_auth REQUIRED
        http_access allow internet_users
        http_access deny all

In the same folder:
sudo touch internet_users
sudo htpasswd -c /etc/squid3/internet_users user1
sudo chmod 440 /etc/squid3/internet_users
sudo service squid3 restart

I have a Mac, in the "Network" settings I select HTTP Web Proxy , I enter the public ip of the instance from Amazon (ssh and port 8888 are allowed in secutiry groups), port, user and password.
It is worth going to Safari, a dialog box appears asking you to enter a user and password. I enter, but the window appears again and again.
It looks like there is a problem with authorization.
Knowledgeable people, help to understand.
Thank you.
UPD.
On Windows, the situation is the same - in the browser it always asks for a UPD login / password . debug_options ALL,2 , in /var/log/squid3/cache.log :
GET http://ya.ru/ HTTP/1.1
Host: ya.ru
Connection: keep-alive
Proxy-Connection: keep-alive
Proxy-Authorization: Basic ZmxhdHR5OmRLNko2Z011dHB6OA==
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/600.4.10 (KHTML, like Gecko) Version/8.0.4 Safari/600.4.10
Accept-Language: ru
DNT: 1
Accept-Encoding: gzip, deflate


----------
FATAL: /etc/squid3/internet_users: (13) Permission denied
2015/03/20 17:52:00.317| WARNING: basicauthenticator #1 exited
2015/03/20 17:52:00.317| Too few basicauthenticator processes are running (need 1/5)
2015/03/20 17:52:00.317| Starting new helpers
2015/03/20 17:52:00.317| helperOpenServers: Starting 1/5 'basic_ncsa_auth' processes
2015/03/20 17:52:00.317| client_side_request.cc(786) clientAccessCheckDone: The request GET http://ya.ru/ is AUTH_REQUIRED, because it matched 'internet_users'
2015/03/20 17:52:00.318| client_side_reply.cc(1974) processReplyAccessResult: The reply for GET http://ya.ru/ is ALLOWED, because it matched 'internet_users'
2015/03/20 17:52:00.318| client_side.cc(1377) sendStartOfMessage: HTTP Client local=private_ip:8888 remote=my_ip:53001 FD 14 flags=1
2015/03/20 17:52:00.318| client_side.cc(1378) sendStartOfMessage: HTTP Client REPLY:
---------
HTTP/1.1 407 Proxy Authentication Required
Server: squid/3.3.8
Mime-Version: 1.0
Date: Fri, 20 Mar 2015 17:52:00 GMT
Content-Type: text/html
Content-Length: 3677
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Vary: Accept-Language
Content-Language: ru
Proxy-Authenticate: Basic realm="=PROXY serveR 1="
X-Cache: MISS from ip-private_ip
X-Cache-Lookup: NONE from ip-private_ip:8888
Via: 1.1 ip-private_ip (squid/3.3.8)
Connection: keep-alive

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-03-20
@bk0011m

And what does it write in the logs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question