Squid's ncsa_auth User Authentication Proxy

Source: Internet
Author: User

1. Install squid and HTTP

#yum install -y squid httpd

2. Configure NCSA Authentication

① Create an authentication username and password and use the HTTP htpasswd

#htpasswd  /etc/squid/passwd carl

② Determine whether Squid supports authentication helper

#rpm -ql squid | grep ncsa_auth

Output

/Usr/lib64/squid/ncsa_auth: the location of the NCSA authentication file in the configuration file

③ Configure squid. conf

# Vim/etc/squid. conf ## change http_port 8808 # squid service port number # Add auth_param BASIC Program/usr/lib64/squid/ncsa_auth/etc/squid/passwd // to define the squid password file and ncsa_auth file Location auth_param basic children 15 // Number of authentication processes auth_param basic realm Squid proxy-caching Web Server // squid performs basic proxy Web Cache auth_param basic credentialsttl 2 hours // authentication validity period auth_param basic casesensitive off // the user name is case insensitive, can be changed to on case sensitive # Note: The content configuration file of the above five rows must be configured on the ACL and http_access lines, otherwise, the # Can't use proxy auth because no authentication schemes are fully configured will be reported when squid is started. # fatal: Error: Invalid ACL: ACL Carl proxy_auth required # Add the ACL Carl proxy_auth required in the appropriate position of the ACL line # Add http_access allow Carl in the line of http_access deny Manager

④ Restart squid

#/etc/init.d/squid restart


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.