免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3724 | 回复: 10
打印 上一主题 下一主题

[proxy] 怎么配置squid,以支持变量传递 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-09 15:18 |只看该作者 |倒序浏览
如题,比如,在URL中有?的变量

论坛徽章:
0
2 [报告]
发表于 2007-01-09 15:29 |只看该作者
版本是 2.6

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
3 [报告]
发表于 2007-01-09 15:49 |只看该作者
不明白你的意思。

你的变量,需要传递到什么地方?

论坛徽章:
0
4 [报告]
发表于 2007-01-09 16:00 |只看该作者
一些动态页面,如搜索,如 http:  //xxx.com:88/Article/Search.asp?keyword=sdffsdaf&ClassID=&Field=Title&submit.x=20&submit.y=8

就提示如下的错误

The requested URL could not be retrieved

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

While trying to retrieve the URL: http://xxx.com:88/Article/Search.asp?

The following error was encountered:

Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.

[ 本帖最后由 hss202 于 2007-1-9 17:01 编辑 ]

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
5 [报告]
发表于 2007-01-09 17:25 |只看该作者
你的规则是怎么定义的?

squid是肯定可以放行这样子的网址的。

论坛徽章:
0
6 [报告]
发表于 2007-01-09 17:53 |只看该作者
没有定义特别的规则,基本上都用默认的,其它的就开了反向代理和全部能访问

[ 本帖最后由 hss202 于 2007-1-9 18:01 编辑 ]

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
7 [报告]
发表于 2007-01-10 08:57 |只看该作者
原帖由 hss202 于 2007-1-9 17:53 发表
没有定义特别的规则,基本上都用默认的,其它的就开了反向代理和全部能访问


你就这么吝啬啊,帖配置回来看看。

论坛徽章:
0
8 [报告]
发表于 2007-01-10 09:57 |只看该作者
,因为不熟,所以想先弄通了,再慢慢调整.还有,我的平台是 win 2003的.好像很少人用win的.

文件太长,我只取了有用的这部分



  1. # Squid normally listens to port 3128
  2. http_port 88 transparent vhost vport

  3. cache_peer 127.0.0.1 parent 80 0 no-query originserver

  4. hierarchy_stoplist cgi-bin ?


  5. acl QUERY urlpath_regex cgi-bin \?
  6. cache allow QUERY #这个是我加上的.原来是下面一行的.
  7. #cache deny QUERY


  8. acl apache rep_header Server ^Apache
  9. broken_vary_encoding allow apache


  10. cache_mem 64 MB

  11. #Default:
  12. cache_dir ufs c:/squid/var/cache 100 16 256


  13. #  To log the request via syslog specify a filepath of "syslog"
  14. access_log c:/squid/var/logs/access.log squid


  15. #
  16. #Suggested default:
  17. refresh_pattern ^ftp:                1440        20%        10080
  18. refresh_pattern ^gopher:        1440        0%        1440
  19. refresh_pattern .                0        20%        4320


  20. #Recommended minimum configuration:
  21. acl all src 0.0.0.0/0.0.0.0
  22. acl manager proto cache_object
  23. acl localhost src 127.0.0.1/255.255.255.255
  24. acl to_localhost dst 127.0.0.0/8
  25. acl SSL_ports port 443
  26. acl Safe_ports port 80                # http
  27. acl Safe_ports port 88                # http1
  28. acl Safe_ports port 21                # ftp
  29. acl Safe_ports port 443                # https
  30. acl Safe_ports port 70                # gopher
  31. acl Safe_ports port 210                # wais
  32. acl Safe_ports port 1025-65535        # unregistered ports
  33. acl Safe_ports port 280                # http-mgmt
  34. acl Safe_ports port 488                # gss-http
  35. acl Safe_ports port 591                # filemaker
  36. acl Safe_ports port 777                # multiling http
  37. acl CONNECT method CONNECT


  38. # Only allow cachemgr access from localhost
  39. http_access allow all manager localhost
  40. http_access deny manager
  41. # Deny requests to unknown ports
  42. http_access deny !Safe_ports
  43. # Deny CONNECT to other than SSL ports
  44. http_access deny CONNECT !SSL_ports
  45. #
  46. # And finally deny all other access to this proxy
  47. #http_access deny all
  48. http_access allow all


  49. # and finally allow by default
  50. http_reply_access allow all


  51. #Allow ICP queries from everyone
  52. icp_access allow all

  53. #
  54. # none
  55. visible_hostname localhost

  56. # Leave coredumps in the first cache dir
  57. coredump_dir c:/squid/var/cache


复制代码


因为机器是在使用中的,所以只能先用88端口来测试,我想这个应该不影响.
反向配置是参照你的这篇 http://bbs.chinaunix.net/viewthread.php?tid=798564&extra=page%3D1

[ 本帖最后由 hss202 于 2007-1-10 10:02 编辑 ]

论坛徽章:
0
9 [报告]
发表于 2007-01-10 10:59 |只看该作者
问题解决了,把下面这行注释掉就OK

hierarchy_stoplist cgi-bin ?

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
10 [报告]
发表于 2007-01-10 12:07 |只看该作者
原帖由 hss202 于 2007-1-10 10:59 发表
问题解决了,把下面这行注释掉就OK

hierarchy_stoplist cgi-bin ?


  早贴出来说不定你自己都早解决了。

  win下面和其他系统的配制基本差不多。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP