squid high anonymous configuration username and password configuration


1. Install squid

yum install squid

2. Modify the configuration file

// Add the following permission configuration above http_access deny all, pay attention, it must be above this sentence
//Username and password configuration
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
acl auth_user proxy_auth REQUIRED
http_access allow auth_user

// Add the high anonymous configuration at the end of the file

request_header_access X-Forwarded-For deny all
request_header_access From deny all
request_header_access Via deny all

//Modify many programs that automatically crawl free agents on the port network

http_port3228

 


3. Configure the username and password

and enter it under the bin directory where httpd is installed

./htpasswd  -c /etc/squid/passwd YOUR_NAME

You will be prompted to enter a password. Entering
it means generating a login user name and password in /etc/squid/passwd

4. service squid restart Restart squid

If you find a problem, go to the /var/log/squid directory to see the log

If connecton refused, see if iptables is enabled

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326801088&siteId=291194637