• Centos 6.4下用Squid配置反向代理多个内网WEB服务器


    http_port 80 accel vport
    visible_hostname bogon
    cache_mem 128 MB
    
    maximum_object_size_in_memory 2048 KB
    
    memory_replacement_policy lru
    
    cache_dir ufs  /usr/local/squid/var/cache/squid 512 16 256
    
    access_log /usr/local/squid/var/logs/access.log
    
    cache_log /usr/local/squid/var/logs/cache.log
    
    max_open_disk_fds 0
    
    minimum_object_size 0 KB
    
    maximum_object_size 32768 KB
    
    #logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h""%{User-Agent}>h" %Ss:%Sh
    
    cache_peer 192.168.20.17 parent 80  0 no-query no-digest originserver name=oa
    cache_peer 10.19.113.3 parent 80  0 no-query no-digest originserver name=ob
    
    #需要反向代理的源WEB服务器,可以添加多个 ,若只有一个源WEB服务器,可不设name
    
     
    
    #需要反向代理的源WEB服务器,可以添加多个
    
    cache_peer_domain oa oa.XXX.com.cn
    cache_peer_domain ob ob.XXX.com.cn
    
    #若只有一个源WEB服务器,可不设cache_peer_domain
    
    
    http_access allow all
    
    cache_effective_user nobody
    
    cache_effective_group nobody
    
    cache_mgr zifu.199s0@163.com
    
    #refresh_pattern ^ftp: 60 20% 10080
    
    #refresh_pattern ^gopher: 60 0% 1440
    
    #refresh_pattern ^gopher: 60 0% 1440
    
    #refresh_pattern . 0 20% 1440
    
    refresh_pattern -i \.css$      360    50%    2880
    
    refresh_pattern -i \.js$        1440    50%    2880
    
    refresh_pattern -i \.html$      720    50%    1440
    
    refresh_pattern -i \.jpg$      1440    90%    2880
    
    refresh_pattern -i \.gif$      1440    90%    2880
    
    refresh_pattern -i \.swf$      1440    90%    2880
    
    refresh_pattern -i \.jpg$      1440    50%    2880
    
    refresh_pattern -i \.png$      1440    50%    2880
    
    refresh_pattern -i \.bmp$      1440    50%    2880
    
    refresh_pattern -i \.doc$      1440    50%    2880
    
    refresh_pattern -i \.ppt$      1440    50%    2880
    
    refresh_pattern -i \.xls$      1440    50%    2880
    
    refresh_pattern -i \.pdf$      1440    50%    2880
    
    refresh_pattern -i \.rar$      1440    50%    2880
    
    refresh_pattern -i \.zip$      1440    50%    2880
    
    refresh_pattern -i \.txt$      1440    50%    2880

    Linux下配置反向代理,实现一个公网IP代理多个内网的web服务器。

  • 相关阅读:
    grafana+mysql忘记admin密码解决方法
    grafana 的配置文件,和使用mysql数据库做持久化
    贴两个mysql优化的配置文件
    Zabbix监控win10系统
    zabbix监控mysql
    http状态码-备查
    安卓移动端line-height垂直居中出现偏移的解决方法
    Video 自动播放
    渐进式Web应用(PWA)
    基于svg的环形进度条
  • 原文地址:https://www.cnblogs.com/daretodream/p/3046975.html
Copyright © 2020-2023  润新知