Common configurations of Squid Proxy

Source: Internet
Author: User
Tags squid proxy

Common configurations of squid Proxy

Squid. conf is the main configuration file of squid. Common configuration items include:

Http_port 192.168.8.88: 3128

# Specify the listening port and IP address

Cache_mem 64 MB

# Set the memory size used for caching,

# MB can be used to save frequently accessed web pages.

Maximum_object_size 4096 KB

# Maximum object size that can be saved to the cache, in KB.

# Files larger than this size will not be cached and sent directly to users.

Reply_body_max_size 10240000 allow all

# Maximum file size that can be downloaded by users. The default unit is byte)

# "All" indicates the name of the access control list, indicating all users.

Cache_dir ufs/var/spool/squid 100 16 256

# Set the directory parameters used to cache data, in which ufs (unix file system)

It is the earliest cache file format used by squid and also the built-in storage format type of squid;

/Var/spool/squid is the default directory for storing cached data;

The following three numbers are represented in sequence:

Disk space available for the cache directory (unit: MB)

Number of first-level subdirectories

Number of list subdirectories

Configure the initialized squid according to this line. 16 level-1 subdirectories (00, 01,..., 0F) will be created under the/var/spool/squid/directory)

Create 256 subdirectories (00, 01,..., FF) under each subdirectory)

The cached data is stored in the preceding directory.

Access_log/var/log/squid/access. log squid

# Specify the storage location and record format (squid) of the log file, which records the web objects accessed by the client through the proxy.

Visible_hostname proxy.linuxfan.cn

# Set the Host Name of the proxy server, which may be used when squid is initialized or the service is started.

Dns_testnames www.google.comwww.baidu.com

# In order to ensure that the proxy is normal and the dns test website is set, match from left to right to stop

Squid details: click here
Squid: click here

Recommended reading:

Configure Squid proxy http and rsync

Squid: high-speed Web Access

CentOS 6.2 compilation and installation Squid configuration Reverse Proxy Server

Application of Squid in Enterprise Network

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.