In ubuntu9.10, configure the Internet proxy (SQUID) that requires the user name and password)

Source: Internet
Author: User
Tags squid proxy

1 install squid

Sudo apt-Get install squid

2. Install htpasswd (skip this step if Apache is installed)

(This is used to generate a password)

Sudo apt-Get install apache2-utils

Yes.

Sudo apt-Get install mini-HTTPd

3. Generate a password file

 Htpasswd-C/etc/squid/passwd user1

You will be asked to enter the user1 Password

4. Change the permission to ensure that squid can read the password file.

SudoChmod o + R/etc/squid/passwd

5. Modify squid. conf to add or modify it to the following figure.

Auth_param BASIC Program/usr/lib/squid/ncsa_auth/etc/squid/passwd
Auth_param basic children 5
Auth_param basic realm Squid proxy-caching Web Server
Auth_param basic credentialsttl 2 hours
Auth_param basic casesensitive off

 

ACL ncsa_users proxy_auth required
Http_access allow ncsa_users
 

6 restart squid

Sudo/etc/init. d/squid restart

Done!

If you do not have htpasswd, you do not want to install htpasswd. You can also run CP on another machine to obtain a password file.

Related Article

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.