542179528 发表于 2018-12-26 12:12:35

配置Squid遇到的问题和解决方法

  3》Unable to forward this request at this time
  解答:
  在配置中加下面一行
  cache_peer www.abc.comparent 80 0 no-query originserver
  为了大家方便比较我贴出我的配置文件,供大家参考
  http_port 80 transparent
  https_port 443 defaultsite=www.abc.com cert=/usr/local/squid/zcxcert.pem key=/usr/local/squid/zcxkey.pem
  icp_port 0
  hierarchy_stoplist cgi-bin ?
  acl QUERY urlpath_regex cgi-bin \? \.aspx \.ashx \.asmx
  cache deny QUERY
  acl apache rep_header Server ^Apache
  broken_vary_encoding allow apache
  cache_mem 512 MB
  cache_swap_low 90
  cache_swap_high 95
  maximum_object_size 8192 KB
  maximum_object_size_in_memory 32 KB
  cache_dir ufs /usr/local/squid/var/cache 2048 16 256
  #access_log /usr/local/squid/var/logs/access.log common
  access_log none
  cache_log /usr/local/squid/var/logs/cache.log
  #cache_store_log /usr/local/squid/var/logs/store.log
  cache_store_log none
  emulate_httpd_log on
  pid_filename /usr/local/squid/var/logs/squid.pid
  hosts_file /etc/hosts
  refresh_pattern ^ftp:         1440    20%   10080
  refresh_pattern ^gopher:      1440    0%      1440
  refresh_pattern .               0       20%   4320
  half_closed_clients off
  acl all src 0.0.0.0/0.0.0.0
  acl myip src 21.142.17.170 21.24.82.35
  acl manager proto cache_object
  acl localhost src 127.0.0.1/255.255.255.255
  acl to_localhost dst 127.0.0.0/8
  acl 252 dst 21.238.23.252
  acl 251 dst 21.238.23.251
  acl 233 dst 21.238.23.233
  acl 237 dst 21.238.23.237
  acl 234 dst 21.238.23.234
  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

页: [1]
查看完整版本: 配置Squid遇到的问题和解决方法