更新库:apt-get update
安装:apt-get install squid squid-common
ubuntu 12.04 安装的 squid3
配置和开启
配置文件:vi /etc/squid.conf
3.1监听端口
http_port 3128
3.2 访问控制
http_access allow all
3.3开启squid3
3.3.1 初始化squid.conf里的cache目录
/usr/sbin/squid3 -z
3.3.2 对squid.conf进行排错
/usr/sbin/squid3 -k parse
3.3.3 前台启动squid3
/usr/sbin/squid3 -N -d1
3.3.4后台运行squid3
/usr/sbin/squid3 -s
3.3.5 停止
/usr/sbin/squid3 -k shutdown
3.3.5 重新引导修改过的squid.conf
/usr/sbin/squid3 -k reconfigure
配置:
# Recommended minimum configuration: # acl manager proto cache_object acl localhost src 127.0.0.1/32 ::1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 # Example rule allowing access from your local networks. # Adapt to list your (internal) IP networks from where browsing # should be allowed #acl localnet src 10.0.0.0/8 # RFC1918 possible internal network #acl localnet src 172.16.0.0/12 # RFC1918 possible internal network #acl localnet src 192.168.0.0/16 # RFC1918 possible internal network #acl localnet src fc00::/7 # RFC 4193 local private network range #acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT ##auth_param basic program <uncomment and complete this line> auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/passwd auth_param basic children 5 ##auth_param basic realm Squid proxy-caching web server auth_param basic casesensitive off auth_param basic credentialsttl 2 hours #Default: # none ## zi ding yi pei zhi acl auth_user proxy_auth REQUIRED #default: # http_access deny all # http_access allow auth_user # # recommended minimum access permission configuration: # # only allow cachemgr access from localhost http_access allow manager localhost http_access deny manager # deny requests to certain unsafe ports http_access deny !safe_ports # deny connect to other than secure ssl ports http_access deny connect !ssl_ports # We strongly recommend the following be uncommented to protect innocent # web applications running on the proxy server who think the only # one who can access services on "localhost" is a local user #http_access deny to_localhost # # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # # Example rule allowing access from your local networks. # Adapt localnet in the ACL section to list your (internal) IP networks # from where browsing should be allowed #http_access allow localnet http_access allow localhost # And finally deny all other access to this proxy http_access deny all # Squid normally listens to port 3128 http_port 3128 #Default: # coredump_dir none # # Leave coredumps in the first cache dir coredump_dir /var/spool/squid3 # Add any of your own refresh_pattern entries above these. refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880 # example lin deb packages #refresh_pattern (\.deb|\.udeb)$ 129600 100% 129600 refresh_pattern . 0 20% 4320
相关推荐
squid 安装配置,linux版本 阿呆收费
Squid安装及详细配置
squid_配置详解
详细的linux下squid 的安装,配置,卸载过程,详细的命令,常见问题解决。
SQUID原理分析,安装,配置,使用手册。
公司项目部署需要在服务器上部署,部署的时候要求离线操作,不能联网,所以不能yum install squid来安装squid 于是从网上下了最新版本的squid离线包,进行离线安装,这是我参照了网上的安装方法,解决了安装中的一些...
基于squid配置https的实践文档,基于自己实践写的,不是翻译的 主要是没分了,所以要点分哈
Squid 2.6 反向代理配置.doc, Squid 代理配置
squid的配置说明 squid:一款在linux下的代理服务器软件 功能相当强大
squid中文配置指南 包括配置步骤等信息。不过是介绍在linux和unix上的。
1.Net-snmp 获取与安装 2.Net-snmp 的配置 ...2.Squid 获取与安装 3.Squid 配置 4.Squid 测试 5.Squid 常用命令 6.Squid 其他 7.Squid.conf 配置实例 8.Squid.conf 配置说明 9.Squid命中率分析 10.Squid 排错
squid3.0压缩文件,linux上解压安装即可用 配置手册介绍了各配置及其参数
目录 ...1.Net-snmp 获取与安装 1 ...2.Squid 获取与安装 3 3.Squid 配置 4 4.Squid 测试 4 5.Squid 常用命令 5 6.Squid 其他 6 7.Squid.conf 配置实例 6 8.Squid.conf 配置说明 7 9.Squid命中率分析 11 10.Squid 排错 12
squid编译安装及配置详解.pdf
squid配置实用教程 squid配置实用教程
squid和nginx配置正向代理访问API接口
1、 安装squid #rpm –ivh squid-*.rpm 2、 备份squid配置文件squid.conf #cp /etc/squid/squid.conf /home 3、 删除默认squid配置文件 #cd /etc/squid #rm –f squid.conf
linux下Squid代理服务器的详细搭建配置。有图有真相哦!
Awstats 7分析squid日志【安装+配置】
squid3配置参考手册