squid反向代理问题,请squid高手帮忙

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
fanux
帖子: 2
注册时间: 2006-02-24 22:49
送出感谢: 0
接收感谢: 0

squid反向代理问题,请squid高手帮忙

#1

帖子 fanux » 2007-03-11 21:20

在动态页设置了Last-Modified和Expires,但IE按Ctrl+F5和FF按F5,还是会到web服务器取。请教如何在设计动态页面,使其刷新该页面在该页过期前不去访问web服务器。请高手赐教,谢谢!!!
系统: ubuntu6.10+squid2.6+LAMP
-----------------------------------------------------
我的缓存页设计如下
-----------------------------------------------------
<?php
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s", time()+3600) . " GMT");
echo "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" . "<br>";
echo "Expires: " . gmdate("D, d M Y H:i:s", time()+30) . " GMT" . "<br>";
?>
-----------------------------------------------------
我的squid.conf配置如下
-----------------------------------------------------
#
http_port 192.168.0.101:8080 transparent vhost vport
#
acl OverConnLimit maxconn 16
http_access deny OverConnLimit
#
acl Manager proto cache_object
acl Localhost src localhost
http_access allow Manager Localhost
http_access deny Manager
#
visible_hostname cache.neo.com
cache_mgr webmaster@neo.com
#
cache_effective_user squid
cache_effective_group squid
tcp_recv_bufsize 65536 bytes

cache_peer 192.168.0.101 parent 80 0 no-query originserver

icp_port 0

acl all src 0.0.0.0/0.0.0.0
http_access allow all

cache_dir ufs /var/cache/squid/cache 1024 16 256

cache_store_log /var/cache/squid/cache/store.log
cache_log /var/cache/squid/cache/cache.log

cache_effective_user squid
cache_effective_group squid
-------------------------------------------------------------
回复

回到 “服务器基础应用”