本文详细介绍Squid实现反向代理并且具备内网代理
我的站点上的所有文件都是静态html,为了进一步的加快网页速度,于是使用squid实现反向代理缓存功能。
@ 安装squid
为了偷懒就直接使用ports安装,因为我将所有的服务器系统都安装在/s分区中,所以设置了PREFIX为/s/squid
# cd /usr/ports/www/squid
# setenv PREFIX /s/squid
# make install clean
安装完成后编辑/s/squid/etc/squid/squid.conf,我的配置内容如下:
########## Base control ##########
cache_mgr webmaster
cache_effective_user squid
cache_effective_group squid
visible_hostname sleepcat.3322.org
http_port 127.0.0.1:3128
icp_port 0
cache_dir ufs /usr/cache 300 16 256
cache_access_log /dev/null
cache_log /dev/null
cache_store_log /dev/null
error_directory /s/squid/etc/squid/errors/Simplify_Chinese
icon_directory /s/squid/etc/squid/icons
mime_table /s/squid/etc/squid/mime.conf
coredump_dir /s/squid/squid/cache
pid_filename /s/squid/squid/logs/squid.pid
hosts_file /etc/hosts
unlinkd_program /s/squid/libexec/squid/unlinkd
########## 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
责编:豆豆技术应用
- 配置 SCA 组件参与 WS-AT 全局事务
- 使用 WebSphere Process Server 关系开发集成解决方案
- Samba服务器安装配置过程介绍
- pptpd+radius+mysql 安装攻略(part1 pptpd部分)
- slackware10.0安装PPTPD服务做MPPE加密VPN的全过程
- LINUX 下 VPN 服务器 pptpd 配置
- Red Hat 8.0上通过RPM安装PPTPD服务器
- 快速安装Linux上的pptpd服务器
- 使用Windows PowerShell查看系统信硬件信息-1
- 在 WebSphere Portlet Factory 中创建 Web Service