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