LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 891|回复: 9

squid反向web代理的实现,有人知道怎么做吗?(已经搞定啦)

[复制链接]
发表于 2005-4-28 14:14:14 | 显示全部楼层 |阅读模式
squid反向web代理的实现,有人知道怎么做吗?
在网上怎么也找不到
 楼主| 发表于 2005-4-28 17:04:27 | 显示全部楼层
哈哈,没人回答,自己搞定啦。

改动httpd.conf 的listen 为127.0.0.1:8080

设置squid.conf 如下:重启 ok!!!

########## Base control ##########
cache_mgr webmaster
cache_effective_user squid
cache_effective_group squid
http_port 80
icp_port 0
cache_dir ufs /usr/local/squid/cache 1024 16 256
cache_store_log none
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
emulate_httpd_log on
pid_filename /usr/local/squid/var/logs/squid.pid

########## Performance control ##########
cache_mem 8 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
cache_replacement_policy lru
memory_replacement_policy lru
emulate_httpd_log off
log_ip_on_direct on
log_mime_hdrs off
dns_timeout 2 minutes
request_header_max_size 10 KB
request_body_max_size 0 KB
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4320
negative_ttl 5 minutes
positive_dns_ttl 6 hours
negative_dns_ttl 1 minute
connect_timeout 1 minute
read_timeout 15 minutes
request_timeout 5 minutes
client_lifetime 1 day
half_closed_clients on
maximum_single_addr_tries 1
uri_whitespace strip
ie_refresh off

########## Access control ############
acl all src 0.0.0.0/0.0.0.0
http_access allow all
http_reply_access allow all
hierarchy_stoplist cgi-bin ?

########## Accelator control ############
httpd_accel_host virtual
httpd_accel_port 8080
httpd_accel_with_proxy on
httpd_accel_uses_host_header    on

########## Misc control ###########
ftp_user Squid@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on
回复 支持 反对

使用道具 举报

发表于 2005-4-28 20:08:08 | 显示全部楼层
老大,请问何为squid反向web代理?是要实现什么功能呢?
回复 支持 反对

使用道具 举报

发表于 2005-4-28 20:13:46 | 显示全部楼层
guruguru,兄弟
请问反向代理是实现一种什么样的代理功能啊?

请给我说一下可以吗?

谢谢了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-28 20:52:57 | 显示全部楼层
通过缓存网页的形式,使用户在查看已有用户浏览过的网页时,无须再通过WEB服务器,直接在代理里调用,从而提高本地的Web服务器性能和本地网络的安全性
回复 支持 反对

使用道具 举报

发表于 2005-4-29 11:57:39 | 显示全部楼层
那样的话,是不是不能看到更新后的网页了?
回复 支持 反对

使用道具 举报

发表于 2005-4-29 12:50:48 | 显示全部楼层
好文章,我也在找这方面的资料。
等我的服务器到位后,也照着做一个。
不知道squid对论坛有没有缓存效果,还是要自己亲自试一下。
回复 支持 反对

使用道具 举报

发表于 2005-5-11 16:22:55 | 显示全部楼层
为什么我用你的配置文件后,启动会出错?
回复 支持 反对

使用道具 举报

发表于 2005-5-11 16:25:50 | 显示全部楼层
为什么我用你的配置文件后,启动会出错?
启动时的提示为:

Starting squid.
2005/05/11 15:19:33| WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
2005/05/11 15:19:33| WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
2005/05/11 15:19:33| WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
回复 支持 反对

使用道具 举报

发表于 2005-5-11 19:40:00 | 显示全部楼层
acl all src  192.168.1.0/255.255.255.0
http_access allow all
http_reply_access allow all

===========================
ok!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表