zoukankan      html  css  js  c++  java
  • rhel5 (AS5) 上配置 Squid

    测试环境:RedHat Linux Enterprise 5 + LAN

    最简单配置(任意局域网用户都可以连接):

    --------------------------------------------------

    http_port 服务器IP:8080
    cache_mem 64 MB
    cache_dir ufs /var/spool/squid 4096 16 256
    cache_effective_user squid
    cache_effective_group squid
    dns_nameservers DNS服务器IP
    cache_access_log /var/log/squid/access.log
    cache_log /var/log/squid/cache.log
    cache_store_log /var/log/squid/store.log
    visible_hostname 服务器IP
    cache_mgr 管理员邮箱地址

    acl all src 0.0.0.0/0.0.0.0
    http_access allow all

    --------------------------------------------------

    透明代理配置:

    1.添加以下配置命令

    --------------------------------------------------

    httpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on

    --------------------------------------------------

    2.用 iptables 实现端口转接

    用户口令配置:

    1.添加以下配置命令

    --------------------------------------------------

    auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
    auth_param basic children 5
    auth_param basic credentialsttl 2 hours
    auth_param basic realm Example.com's Squid proxy-caching
    acl auth_user proxy_auth REQUIRED
    http_access allow auth_user

    --------------------------------------------------

    2.用Apache工具生成用户口令/密码文件

  • 相关阅读:
    0705. Design HashSet (E)
    VMware简单使用
    Git笔记
    初识MyBatis
    数据库连接池配置 testOnBorrow
    Redis list操作命令
    文件/目录对比:diff命令
    可用于区块链的共识算法
    分布式一致性算法,你确定不了解一下?
    Jmeter文件下载测试
  • 原文地址:https://www.cnblogs.com/exclm/p/1395783.html
Copyright © 2011-2022 走看看