设为首页
收藏本站
切换到宽版
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
论坛
BBS
排行榜
Ranklist
搜索
搜索
热搜:
香港vps
香港VPS
amh
机柜
vps
分销
VPS
域名出售
火车头
云主机
不限流量
香港服务器
美国服务器
香港
全能空间
whmcs
digitalocean
本版
帖子
用户
MJJ论坛
»
论坛
›
主机综合交流
›
美国VPS综合讨论
›
centos vps架设简单的squid反向代理服务器
1
2
/ 2 页
下一页
返回列表
查看:
7282
|
回复:
17
centos vps架设简单的squid反向代理服务器
[复制链接]
cuijz
cuijz
当前离线
积分
5764
发表于 2010-8-12 16:05:07
|
显示全部楼层
|
阅读模式
先去掉apache
yum -y remove httpd
复制代码
然后下载安装squid3.0
wget http://people.redhat.com/jskala/squid/squid-3.0.STABLE25-1.el5/i386/squid-3.0.STABLE25-1.el5.i386.rpm
rpm -i squid-3.0.STABLE25-1.el5.i386.rpm
复制代码
修改配置文件/etc/squid/squid.conf的内容为
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
http_port 80 vhost
cache_peer 你的上级web服务器的ip parent 80 0 no-query originserver name=yourfirstdomain.com
cache_peer_domain yourfirstdomain.com .yourfirstdomain.com
cache_peer 你的上级web服务器的ip parent 80 0 no-query originserver name=yourotherdomain.com
cache_peer_domain yourotherdomain.com .yourotherdomain.com
http_access allow all
cache_mem 64 MB
emulate_httpd_log on
visible_hostname buyvmvps
cache_mgr
[email protected]
access_log /var/log/squid/access.log squid
refresh_pattern . 0 20% 4320
acl apache rep_header Server ^Apache
coredump_dir /var/spool/squid
复制代码
设置开机启动,启动squid
chkconfig --level 2345 squid on
service squid start
复制代码
评分
参与人数
1
威望
+5
收起
理由
cuxian
+ 5
真应要求给教程了,谢谢!
查看全部评分
回复
举报
cncoc
cncoc
当前离线
积分
723
发表于 2010-8-12 16:21:28
|
显示全部楼层
反向代理最近好像很时髦,有机会试一下
回复
支持
0
反对
1
举报
cuxian
cuxian
当前离线
积分
12058
发表于 2010-8-12 16:28:42
|
显示全部楼层
不错。收藏了
回复
支持
反对
举报
cnx
cnx
当前离线
积分
20716
发表于 2010-8-12 20:26:39
|
显示全部楼层
楼主是转载的,还是实测过的?
回复
支持
反对
举报
cuijz
cuijz
当前离线
积分
5764
楼主
|
发表于 2010-8-12 20:40:46
|
显示全部楼层
实际安装后整理的步骤
回复
支持
反对
举报
9500pro
9500pro
当前离线
积分
1247
发表于 2010-8-12 20:54:14
|
显示全部楼层
谢谢!等一下试试看!
回复
支持
反对
举报
domin
domin
当前离线
积分
25849
发表于 2010-8-12 20:58:10
|
显示全部楼层
可惜squid不支持smp,acl多了,流量大了后CPU占用比较厉害,不过做为反向代理还是很不错的。
另外一个不错的选择就是nginx
回复
支持
反对
举报
mslxd
mslxd
当前离线
积分
12579
发表于 2010-8-12 21:14:28
|
显示全部楼层
貌似不够详细啊,,,可能是我太小白了
回复
支持
反对
举报
大飞机
大飞机
当前离线
积分
2940
发表于 2010-8-13 02:27:02
|
显示全部楼层
收藏 接下来 怎么新建反向代理?
回复
支持
反对
举报
炎羽
炎羽
当前离线
积分
4197
发表于 2010-8-15 15:11:23
|
显示全部楼层
弄下来只是访问主页有代理么
回复
支持
反对
举报
下一页 »
1
2
/ 2 页
下一页
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
Archiver
|
手机版
|
小黑屋
|
MJJ论坛
Copyright
MJJ论坛
© 2022 All Rights Reserved.
快速回复
返回顶部
返回列表