Linux and Cloud computing--the second phase of Linux Server Setup
The
11th chapter:Agent Proxy Server Erection-SQUID for basic certification
Basic Certification
Configuration Basic Certification and Limitations users must Use authentication .
[1]
installation
Package
to
contains htpasswd.
[Email protected] ~]# yum-y install Httpd-tools
[2]
Configuration
Squid
come to
set up basic Auth.
[Email protected] ~]# vi/etc/squid/squid.conf
ACL Connect method Connect
# line: Add the following line to enable authentication
Auth_param Basic PROGRAM/USR/LIB64/SQUID/BASIC_NCSA_AUTH/ETC/SQUID/.HTPASSWD
Auth_param Basic Children 5
Auth_param Basic Realm Squid Basic authentication
Auth_param Basic Credentialsttl 5 hours
ACL Password Proxy_auth REQUIRED
http_access Allow password
# Add a user
[Email protected] ~]# htpasswd-c/etc/squid/.htpasswd Jeffrey
[Email protected] ~]# systemctl restart Squid
[3]
Configuring the Client
.
[Email protected] ~]# Vi/etc/profile
# Add follows to the end
# Username:[email protected]:p ORT
My_proxy_url= "Http://jeffrey:[email protected]: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
# for Yum
[Email protected] ~]# vim/etc/yum.conf
# in the back Add
proxy=http://server.example.com:8080/
Proxy_username=jeffrey
Proxy_password=redhat
# for wget
[Email protected] ~]# VI/ETC/WGETRC
# in the back Add
Http_proxy = http://server.example.com:8080/
Https_proxy = http://server.example.com:8080/
Ftp_proxy = http://server.example.com:8080/
Proxy_user = Jeffrey
PROXY_PASSWD = Redhat
This article is from the "11830455" blog, please be sure to keep this source http://11840455.blog.51cto.com/11830455/1837027
Linux and cloud Computing--the second phase of the 11th Chapter: Agent Proxy Server Erection-SQUID for basic certification