Reverse Proxy for Linux squid

Source: Internet
Author: User
Tags log linux

First, the basic principle

1, the public network in the client

Client

200.168.10.2

2. Squid Reverse proxy Server

Eth0

200.168.10.2

Eth1

192.168.10.1

3. Internal Web server

Web

192.168.10.2

Ii. Modification of squid.conf documents

#配置虚拟80端口 to prevent direct loss of data packets
http_port 200.168.10.1:80 vhost
#重定向的web服务器 0 means that the upper-level cache is not used
Cache_peer 192.168.10.2 Parent 0 originserver weight=5 max-conn=30
#不能不写
visible_hostname 200.168.10.1
#不限制访问ip ACL all
src 0.0.0.0/0.0.0.0
http_access Allow all

If the squid buffer pool is turned on, the effect of static and dynamic separation can be seen at this time.

Third, Cache view

1. Through/var/log/httpd/access.log

2, through the/var/spool/squid under the tree 00来 view the file, and then if there is a cache, you can see through the strings 00000000x

3, through the browser developer tools to see the static file loading state.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/proxy/

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.