Linux and Cloud computing--the second phase of Linux Server Setup
The
11th chapter:Agent Proxy Server-squid proxy and client configuration
Installing Squid
installation Squid come to Configuring a proxy server .
[1]
this is a
Generic forwarding agent configuration
[Email protected] ~]# yum-y install squid
[Email protected] ~]# vi/etc/squid/squid.conf
# line: Add a piece New of the A CL
ACL LAN src 192.168.96.0/24
# line: Add a piece New of the A CL
Http_access Allow LAN
# line: Modify
Http_port 8080
# in the file last added
Request_header_access Referer deny all
Request_header_access X-forwarded-for deny all
Request_header_access Via deny all
Request_header_access Cache-control deny all
# Specify hostname
Visible_hostname server.example.com
# Not display IP address
Forwarded_for off
[Email protected] ~]# systemctl start squid
[Email protected] ~]# Systemctl enable squid
Configuring the Proxy client
[1]
Configuration C
Entos
Client
[Email protected] ~]# Vim/etc/profile
# in the file Last Add ( configure agent as environment variable)
My_proxy_url= "http://server.example.com:8080/"
http_proxy= $MY _proxy_url
https_proxy= $MY _proxy_url
ftp_proxy= $MY _proxy_url
http_proxy= $MY _proxy_url
https_proxy= $MY _proxy_url
ftp_proxy= $MY _proxy_url
Export Http_proxy https_proxy ftp_proxy http_proxy https_proxy ftp_proxy
[Email protected] ~]# Source/etc/profile
# above configuration is complete, but different applications may need to be configured separately
# for Yum
[email protected] ~]# VI m /etc/yum.conf
# in the last added
proxy=http://server.example.com:8080/
# for wget
[Email protected] ~]# VIM/ETC/WGETRC
# in the last added
http_proxy =/http Server . example.com:8080/
Https_proxy = http://server.example.com:8080/
Ftp_proxy = http://server.example.com:8080/
[2]
in the Firefox browser
Configuration
This article is from the "11830455" blog, please be sure to keep this source http://11840455.blog.51cto.com/11830455/1837025
Linux and cloud Computing--the second phase of the 11th Chapter: Agent Proxy Server Setup-squid Proxy and Client configuration