Reverse Proxy service configuration under Linux

Source: Internet
Author: User

Squid reverse proxy, be sure to know what the backend real server's source IP is to configure


Vim/etc/squid/squid.conf

# Squid normally listens to port 3128

Http_port Accel Vhost Vport

Cache_peer 119.75.218.70 Parent 0 originserver Name=a

Cache_peer_domain a www.baidu.com

Cache_peer 115.159.51.96 Parent 0 originserver Name=b

Cache_peer_domain b www.apelearn.com


How can I configure all the domain names on the back-end web for squid agent?

Add a line: Cache_peer 192.168.10.111 0 Originserver so that you can proxy 10.111 on the 80 port of all sites

Transprant, Accel Vhost Vport)

Transprant used to make transparent proxies.

Accel that the agent is the acceleration mode, if not add accel, then squid is a simple proxy, do not cache the data, and after adding it, the client request will be directly from the Squid server to answer the request is no longer forwarded to the real Web server. When configuring the reverse proxy, you can not add Accel, but need to add vhost, which is used to differentiate the proxy backend which domain name, if not add to the access, Vport if the agent is 80 port can not add, but if not 80 port to add.


Test for normal access:

[Email protected] squid]# curl-x127.0.0.1:80 Www.baidu.com-I

http/1.0 OK

In the hosts to add native IP and corresponding www.baidu.com


Check for error: Squid-kcheck

Restart: Squid-kre


This article is from the "Parody Games" blog, so be sure to keep this source http://kevinjin117.blog.51cto.com/11655131/1843407

Reverse Proxy service configuration under Linux

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.