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