Based on Xen VPS Configuration Squid Server _ server other

Source: Internet
Author: User
Tags vps rsync
Installation is simple: Apt-get install squid

The focus of the configuration is to turn on user authentication.

Create a username password file via htpasswd and set it in Squid's configuration file.

Http_port 3128
Auth_param Basic Program/usr/lib/squid/ncsa_auth/etc/squid/squid.password
Auth_param Basic Children 5
Auth_param Basic Realm Hamo ' s Private Proxy
Auth_param Basic Credentialsttl 4 hours

ACL all src all
ACL manager Proto Cache_object
ACL localhost src 127.0.0.1/32
ACL To_localhost DST 127.0.0.0/8
ACL localnet src 10.0.0.0/8 # RFC1918 possible Internal network
ACL localnet src 172.16.0.0/12 # RFC1918 possible Internal network
ACL localnet src 192.168.0.0/16 # RFC1918 possible Internal network

ACL ssl_ports Port 443 # HTTPS
ACL ssl_ports Port 563 # snews
ACL ssl_ports Port 873 # rsync
ACL safe_ports Port # http
ACL safe_ports Port # FTP
ACL safe_ports Port 443 # HTTPS
ACL safe_ports Port # Gopher
ACL safe_ports Port 210 # WAIS
ACL safe_ports Port 1025-65535 # unregistered ports
ACL safe_ports Port 280 # HTTP-MGMT
ACL safe_ports Port 488 # gss-http
ACL safe_ports Port 591 # FileMaker
ACL safe_ports Port 777 # multiling HTTP
ACL safe_ports Port 631 # Cups
ACL safe_ports Port 873 # rsync
ACL safe_ports Port 901 # SWAT
ACL Purge method purge
ACL Connect method Connect

ACL normal Proxy_auth REQUIRED

Http_access allow manager localhost
Http_access Deny Manager
http_access allow purge localhost
Http_access Deny purge
Http_access Deny! Safe_ports
Http_access Deny CONNECT! Ssl_ports
Http_access Deny To_localhost
http_access allow localhost
Http_access Allow normal
Http_access Deny All

Then restart squid.

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.