使用squid代理服务器可以缓存服务器上经常请求页面的HTML代码.如果把它作为反射代理,可以提高网站的访问速度.在网上搜索了很多资料,打算一一做个试验:
安装squid.
yum install squid (on redhat machine)
#configured apache server to serve magento site on port 81 instead of 80
配置apache侦听81端口,因为当我们配置好之后,apache并不对外直接提供浏览服务,而是由squid来提供.所以下面我们要设置squid侦听80端口,来接受传过来的请求.
#now configured squid to serve on port 80
# under /etc/squid/squid.conf, added following lines above http_access settings
http_port 80 accel defaultsite=www.sitename.com
cache_peer 1.1.1.1 parent 81 0 no-query originserver name=myAccel
acl our_sites dstdomain www.sitename.com
http_access allow our_sites
#if you want to allow only .html to be cached, un-comment below lines
#acl HTML url_regex .html$
#cache allow HTML
#cache deny all
# to remove caching on checkout page, add wishlist page in case if it doesnt need caching
...........
参考:
http://www.magentocommerce.com/group/blog/action/viewpost/1080/group/168