- 浏览: 1305185 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (351)
- Java General (37)
- .net General (2)
- Linux Toy (55)
- Oracle (81)
- Mysql (11)
- Programer Career (12)
- Oh, my living ! (2)
- Shell Script (8)
- Web Service (0)
- Linux Server (22)
- Php/Python/Perl (3P) (2)
- Javascript General (5)
- Saleforce Apex Dev (2)
- Web General (5)
- Xen & VM tech. (17)
- PSP (13)
- OpenSolaris (34)
- php (1)
- RAI/flex/action script (16)
- asterisk/CTI (7)
- 交互设计 (6)
- English (3)
- Lucene (1)
最新评论
-
GuolinLee:
markmark
JVM调优总结 -Xms -Xmx -Xmn -Xss -
di1984HIT:
写的太好啊。
JVM调优总结 -Xms -Xmx -Xmn -Xss -
javajdbc:
javajdbc 写道
JVM调优总结 -Xms -Xmx -Xmn -Xss -
javajdbc:
...
JVM调优总结 -Xms -Xmx -Xmn -Xss -
alvin198761:
非常感谢,国外的被封杀了,你这里还有一份
How to Convert An Image-Based Guest To An LVM-Based Guest
For fine control you may need to use Squid proxy server authentication. This will only allow authorized users to use proxy server.
You need to use proxy_auth ACLs to configure ncsa_auth module. Browsers send the user's authentication in the Authorization request header. If Squid gets a request and the http_access rule list gets to a proxy_auth ACL, Squid looks for the Authorization header. If the header is present, Squid decodes it and extracts a username and password.
However squid is not equipped with password authentication. You need to take help of authentication helpers. Following are included by default in most squid and most Linux distros:
=> NCSA: Uses an NCSA-style username and password file.
=> LDAP: Uses the Lightweight Directory Access Protocol
=> MSNT: Uses a Windows NT authentication domain.
=> PAM: Uses the Linux Pluggable Authentication Modules scheme.
=> SMB: Uses a SMB server like Windows NT or Samba.
=> getpwam: Uses the old-fashioned Unix password file.
=> SASL: Uses SALS libraries.
=> NTLM, Negotiate and Digest authentication
Configure an NCSA-style username and password authentication
I am going to assume that squid is installed and working fine.
Tip: Before going further, test basic Squid functionality. Make sure squid is functioning without requiring authorization :)
Step # 1: Create a username/password
First create a NCSA password file using htpasswd command. htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of squid users.# htpasswd /etc/squid/passwd user1
Output:
New password: Re-type new password: Adding password for user user1
Make sure squid can read passwd file:# chmod o+r /etc/squid/passwd
Step # 2: Locate nsca_auth authentication helper
Usually nsca_auth is located at /usr/lib/squid/ncsa_auth. You can find out location using rpm (Redhat,CentOS,Fedora) or dpkg (Debian and Ubuntu) command:# dpkg -L squid | grep ncsa_auth
Output:
/usr/lib/squid/ncsa_auth
If you are using RHEL/CentOS/Fedora Core or RPM based distro try:# rpm -ql squid | grep ncsa_auth
Output:
/usr/lib/squid/ncsa_auth
Step # 3: Configure nsca_auth for squid proxy authentication
Now open /etc/squid/squid.conf file# vi /etc/squid/squid.conf
Append (or modify) following configration directive:auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
Also find out your ACL section and append/modifyacl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users
Save and close the file.
Where,
- auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd : Specify squid password file and helper program location
- auth_param basic children 5 : The number of authenticator processes to spawn.
- auth_param basic realm Squid proxy-caching web server : Part of the text the user will see when prompted their username and password
- auth_param basic credentialsttl 2 hours : Specifies how long squid assumes an externally validated username:password pair is valid for - in other words how often the helper program is called for that user with password prompt. It is set to 2 hours.
- auth_param basic casesensitive off : Specifies if usernames are case sensitive. It can be on or off only
- acl ncsa_users proxy_auth REQUIRED : The REQURIED term means that any authenticated user will match the ACL named ncsa_users
- http_access allow ncsa_users : Allow proxy access only if user is successfully authenticated.
Restart squid:# /etc/init.d/squid restart
发表评论
-
扩大虚拟机硬盘空间的方法
2010-11-18 07:53 2106虚拟机是Xen,但同样适用于KVM. 虚拟机硬盘格式为raw. ... -
挂载虚拟机镜像文件里的 LVM 逻辑分区
2010-10-08 10:52 2267如果按照 “在 CentOS ... -
apache 设置中的两个指令 EnableMMAP/EnableSendfile
2010-06-29 21:18 13965apache 中的目录为 windows 共享文件夹时,出 ... -
lvm on xen
2010-03-25 22:18 1487Moving a Xen Guest into an LVM ... -
apache 的模块安装
2010-01-23 13:18 3673Apache HTTP服务器是一个模块化的软件,管理员可以通过 ... -
redmine & ruby 在ubuntu 上的安装笔记
2009-12-05 11:07 2477edmine & ruby 在ubuntu 上的安装笔 ... -
两台linux完美实现双机热备
2009-11-12 21:39 5820一直想做基于linux的双机热备,一直没有时间和机会。一直以 ... -
windows 无盘机,更新主机名.
2009-11-11 22:03 1340同用一个镜像的无盘机,开机后更新主机名. 写个run. ... -
如何用ssh挂载远程目录
2008-10-30 11:09 1617如何用ssh挂载远程目录 ... -
How to userspace l7 filter on Ubuntu
2008-10-23 08:00 2837How to userspace l7 filter on ... -
Ubuntu 中 apache2+tomcat+mod_jk
2008-09-05 07:45 23271. 分别下载jdk和tomcat, 不建议使用源里的包,因为 ... -
Virtual Hosting With Proftpd And MySQL (Incl. Quot
2008-07-07 17:48 1757This document describes how ... -
Differences Between NFS and iSCSI
2008-06-27 09:44 1378NFS and iSCSI provide funda ... -
Ssh 无密码登录的怪问题
2008-06-23 14:21 1782今天为做Oracle RAC 做ssh的免密码登陆,出现也这个 ... -
dovecot + postfix + postfixadmin 建立mail服务器中的几个事项
2008-05-27 22:48 13686我是新手! 第一次建 ... -
在UBUNTU里安装SquirrelMail邮件服务器
2008-05-27 10:24 2542我没有在UBUNTU里安装过S ... -
查看 apache2 安装了哪些模块
2008-05-26 15:23 5287root@ubuntu-idc:/# apache2ctl - ... -
使用mod_cband管理Apache 2带宽和流量
2008-02-28 22:24 1900About the module mod_cband is ... -
Apache 1.3 基于IP限制带宽
2008-02-28 14:17 1751安装步聚: /usr/local/apache/bin/ ... -
ruby on rails应用性能优化之道
2008-01-24 11:54 3549JavaEye网站从2006年9月11 ...
相关推荐
介绍Squid应用的书籍,内容很详实。 本书从原理,应用,使用方法进行了描述。
Squid Proxy Server 3.1 Beginner,最新版本,使用SQUID必备书籍
Squid is the most popular Web caching software in use today, and it ...high-performance storage options, rewriting requests, HTTP server acceleration, monitoring, debugging, and troubleshooting Squid.
NULL 博文链接:https://lindows.iteye.com/blog/247703
Squid是一个高性能的代理缓冲服务器,也许你已经用过Windows平台下的WinGate,MS Proxy Server等功能类似的产品。Squid是一个应用级代理,在保证客户端主机和服务器主机网络连通后,需要客户端软件做相应的设置后...
The Squid Server and mod_perl Section 12.7. Apache's mod_proxy Module Section 12.8. mod_rewrite Examples Section 12.9. Getting the Remote Server IP in the Backend Server in the Proxy ...
先来说一下Squid for Windows的安装,需求:你要拥有一台可联网的、运行着Windows NT/2000/XP/Server 2003的计算机,还要有Squid for windows的软件包。从网上下载的Squid for windows的二进制文件是压缩到zip...
squid3.5版 for windows 64位。经过在windows server 2008上测试好用。
squid 3.0的源代码,需要编译安装
CDNSoft推出的CDN服务器节点搭建软件是一套基于Delphi开发的CDN服务器配置软件,高效,稳定,安全! CDN配置软件可帮助大中小站长或大中小企业低成本,轻松构建自己的CDN网络或服务器群,提供专业的CDN软件,更好的CDN技术...
Network support servers and applications covered include the Squid proxy server, the Domain Name System (BIND) server, DHCP, firewalls (IPtables and FirewallD), and cloud computing. Table of ...
在“突破公司网络封锁,畅游无限网络”一文提到解决方案中,是利用ccproxy来建立proxy server。ccproxy是图形界面程序,使用比较简单,但是存在着两个问题:首先ccproxy不是免费软件,未注册版本只能提供3个连接;...
squid-perl-hacks Squid 相关的 Perl 脚本imap-auth.pl ============== Squid 的基本身份验证助手,用于针对 IMAP 和 IMAPS 服务器进行身份验证。IMAP: imap-auth.pl imap://imap.myserver....
JellyFish是一个基于Java的程序,旨在使用Squid日志和SNMP监视Squid代理服务器
鱿鱼日志查看器 当使用服务Squid将您的服务器变成代理时,在终端中读取日志很困难。 通过已经很难看到的日志... Once installed, configure the apache web server as you wish. In the apache html directory, make
一个使用 WebSockets 将 URL 从 squid3 代理日志发送到使用 node.js 作为服务器的浏览器的小项目。 #先决条件 使用 /var/log/squid3/access.log 中的日志文件安装 squid3 代理 nodejs-websocket模块( npm install ...
先提条件,您预安装配置squid的这台计算机必须是联入网络的,系统版本是windows 2000/xp/2003/server 2003。1)先下载Squid for Windows版本(//www.jb51.net/softs/43599.html),下载地址如下(ZIP文件名称:squid-...