Configuration of ApacheProxy and Cache functions in Linux
Source: Internet
Author: User
Article title: configure the ApacheProxy and Cache functions in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
After several days of debugging and local machine experiments
Server has been successfully set up. the method is described as follows:
---- 1. installation:
---- Install the apache http server with the REDHAT5.2 disk. you can install the SERVER when installing the SERVER, REDHAT5.2 also has an APACHE manager (CAMANCHE) in the XWINDOWS interface. if you wish to install it in one installation.
---- 2. settings:
---- 1. set PROXY:
---- Enter XWINDOWS and start contral panal. there is a figure marked as W, which is CAMANCHE. click the graph icon to display the configuration field, find the PROXY option in MAIN and change the UNSET to ON. this only enables PROXY function, if you need to configure it, you need to modify it to \ ETC \ HTTPD \ CONF \ HTTPD. the CONF command is used to describe the next message, and the relevant parameters must be adjusted according to the data.
---- A. ProxyRequests on
---- B. ProxyRemote defines the remote management of the SERVER.
---- Than if ProxyRemote * http://proxy.where.com: 8080 * The table shows that all requests are made with the remote PROXY http://proxy.where.com: 8080.
---- C. ProxyBlock: determine which site points are blocked by the PROXY. Such as ProxyBlock
The 123. com www.ftt.net ffff table shows that any site with 123.com and www.ftt.net domain name is blocked by the PROXY and cannot be accessed.
---- At this point, after the PROXY is set to complete, its address is the internal IP address of the machine, saving 80 for the Port shortage. if you need to change it, modify the value in \ ETC \ HTTPD \ CONF \ HTTPD. CONF to change Port 80 to the corresponding Port.
---- 2. set CACHE
---- Reset the value to \ ETC \ HTTPD \ CONF \ HTTPD. CONF.
---- Describe the next life order, and adjust the number of correlation parameters.
D. CacheRoot <diretectory>
---- For example, CacheRoot/var/cache/httpd means that all the caches are stored in this directory.
---- F. CacheSize <size> specifies the size of the slow storage area. The size is KB.
---- You can set the disk size to a small value based on the root requirement.
---- H. CacheGcInterval <time> Check the slow storage area when the interval is <time> small. if the file size exceeds CacheSize, delete the file. The default value is 4.
---- I. CacheMaxExpire <time> when most HTTP files are kept <time> small. The province is 24
---- J. cacheLastModifiedFactor <factor> defines the HTTP file failure period. The default value is 0.1, indicating the failure period = the time when the last modification is performed. X <factor>, for example, if the time between the last modification is 5 hours, then the invalidation period is 5X0.1 = 0.5 hours.
---- K. CacheDirLevels: specifies the number of sub-directory layers for slow storage. the default value is 1.
---- L. CacheDirlength: set the length of the name of the sub-object to 1. All sub-categories
Is composed of a parent group.
---- M. NoCache <word/host/domain list> specifies which sites do not need to be saved.
---- For example, the NoCache 123.com www.ftt.net ffff table shows that any site that appears in the domain name ffff, 123.com and the domain name is www.ftt.net will not be slowed down by the PROXY.
---- The following is my HTTPD on the local SERVER. CONF.
ProxyRequests on
CacheRoot/var/cache/httpd
CacheSize 5000
CacheGcInterval 4
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
---- 3. then, you can determine which IP addresses can be used for proxy server and which IP addresses cannot be modified.
In \ ETC \ HTTPD \ CONF \ HTTPD. CONF
<Directory proxy: *>
<Limit get put delete connect options>
Order deny allow
Deny from [the IP address or node name of proxy server cannot be used]
Allow from [the IP address or node name of proxy server can be used]
</Limit>
</Directory>
---- 4. set the user's browser to use PROXY
---- A. INTERNET EXPLORER
---- Check ---- "internet options -----" connection ------ "serves as the SERVER, and the IP address of the proxy server is 172. 16. 1. 100. if the port is 80, you can input it.
---- B. NETSCAPE
---- EDIT ----- PREFERENCES ---- ADVANCED ----- select MANUAL for PROXYES
Proxy configuration ----- VIEW to enter 172.16.1.100: 80
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