https://www.cnblogs.com/mchina/p/3812190.html

配置文件就加入下面这几句话:

cache_mem 64 MB
maximum_object_size 4 MB
cache_dir ufs /var/spool/squid 100 16 256
access_log /var/log/squid/access.log
http_access allow all
visible_hostname ecs-01.novalocal

[root@ecs-01 squid]# cat /etc/squid/squid.conf

#
# Recommended minimum configuration:
#
cache_mem 64 MB
maximum_object_size 4 MB
cache_dir ufs /var/spool/squid 100 16 256
access_log /var/log/squid/access.log
http_access allow all
visible_hostname ecs-01.novalocal

# 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

#
# Recommended minimum Access Permission configuration:
#
# 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

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# 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

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

#
# 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 . 0 20% 4320

squid 3.5.2配置文件的更多相关文章

  1. Squid 启动/停止/重载配置文件 命令

    当你的 squid.conf 配置文档按照你的想法修改完以后,启动 squid 之旅就开始了. Squid安装设试命令: 1,初始化你在 squid.conf 里配置的 cache 目录 #/usr/ ...

  2. Squid代理服务器

    缓存代理概述:做为应用层的代理服务软件,squid主要提供缓存加速,应用层过滤控制的功能. 1.代理的工作机制 当客户机通过代理来请求web页面时,指定的代理服务器会先检查自己的缓存,如果缓存中已经有 ...

  3. squid 学习笔记

    Squid学习笔记 1.安装前的配置 编译安装之前需要校正的参数主要包括File Descriptor和Mbuf Clusters. 1.File Descriptor 查看文件描述符的限制数目: u ...

  4. squid日志配置与轮询

    squid日志分类及参数 SQUID默认的log文件非常多,其中最重要的LOG日志有三个,分别为access.log.store.log.cache.log.三个日志的记录的内容如下: access. ...

  5. squid代理服务器搭建及配置

    系统环境:CentOS release 6.5 (Final)(最小化安装) 一.安装squid # yum -y install squid 二.编辑配置文件(正向代理) # vim /etc/sq ...

  6. samba和squid 安装

    一. samba配置1. 什么是sambaSamba服务类似于windows上的共享功能,可以实现在Linux上共享文件,windows上访问,当然在Linux上也可以访问到.是一种在局域网上共享文件 ...

  7. squid服务搭建

    Squid配置1. 什么是squidsquid可以做代理也可以做缓存squid缓存不仅可以节省宝贵的带宽资源,也可以大大降低服务器的I/O.  squid不仅可以做正向代理,又可以做反向代理. 正向代 ...

  8. ubuntu使用squid搭建代理

    安装squid //检查是否安装squid which squid // apt update sudo apt install squid 配置squid的配置文件squid.conf //备份sq ...

  9. Squid正向代理(编译安装)

    编译安装 版本为squid-3.5.27 系统为Centos6.5 依赖环境 yum install -y perl gcc*autoconf automake make sudo wget libx ...

随机推荐

  1. 00-B-springmvc分布式项目项目结构

    两个和具体业务关联不紧的模块,单独记录.有的项目可能不需要这两个模块 05模块:p2p-pay 该模块专门用来统一各种支付实现,比如Alipay.微信支付等 com.bjpowernode.pay顶级 ...

  2. 17JQuery

    1. 概念 一个JavaScript框架.简化JS开发  jQuery是一个快速.简洁的JavaScript框架,是继Prototype之后又一个优秀的JavaScript代码库(或JavaScrip ...

  3. (转)Linux传输大文件(分割传输)

    1.分拆为多个文件的命令: cat workspace_2018.tar.gz | split -b 1G - workspace_2018.tar.gz. 命令解释: workspace_2018. ...

  4. vsftpd启动报错:vsftpd:500 OOPS: bad bool value in config file for: anonymous_enable

    vsftpd启动报错:vsftpd:500 OOPS: bad bool value in config file for: anonymous_enable  今天在调试centos vsftp的时 ...

  5. P1879 [USACO06NOV]玉米田Corn Fields[轮廓线DP]

    状压暴力显然可做.但是数据出的再大一点就要稳T了.理论$O(n4^m)$,只不过实际跑不满. 考虑用轮廓线DP,设$f(i,j,S)$为处理到$(i,j)$时候(这格还不确定)的轮廓线为$S$的情况( ...

  6. Python可迭代序列反转总结

    字符串反转 示例:s = "hello" 方法一:使用切片 def reversed_str(s): return s[::-1] 方法二:使用reversed # 字符串 -&g ...

  7. 网络编程之套接字socket

    目录 socket套接字 引子 为何学习socket一定要先学习互联网协议 socket是什么 套接字类型 基于文件类型的套接字家族 基于网络类型的套接字家族 套接字工作流程 基于TCP的套接字 简单 ...

  8. Phaserjs怎样用ES6开发游戏

    想用ES6语法开发phaserjs游戏,是phaserCE,但是不知道怎么导入,总是报错,后来经过多次尝试,解决方法如下: 干脆不导入,直接暴露到window里,然后模块化的代码全部在window.o ...

  9. 使用SQL批量插入数据到数据库 以及一些SQL函数的语法

    批量插入100条记录 set nocount on declare @i int=1; while @i<=100 begin Insert into Client(id,ClientCode, ...

  10. Python 模块 Ⅱ

    搜索路径 当你导入一个模块,Python 解析器对模块位置的搜索顺序是: 1.当前目录 2.如果不在当前目录,Python 则搜索在 shell 变量 PYTHONPATH 下的每个目录. 3.如果都 ...