利用squid 反向代理 ghs.google.com 

众所周知,ghs.google.com 在我国大陆地区是无法访问的。
而要用到谷歌的blogspot、appspot的自定义域名 以及谷歌企业邮局apps 服务都要靠它,
导致广大网民是叫苦不迭.

以前我是经常为寻找可用ip而奔波,现在有了自己的vps,就要利用起来了.

反向代理其实很多web server 都有此功能,而我用的是缓存服务器 squid.

原因可能是觉得squid 设置更加简单吧

其实,缓存和做proxy 只是反向代理的目标不一样而已.
一个本地,一个是远程.

打开squid 配置文件,如我的位于 /etc/sysconfig/squid.conf

在文件顶行,写入:
http_port 80 accel defaultsite=xiazhengxin.cn vhost
acl ghs dstdomain ghs.xiazhengxin.cn
http_access allow ghs
http_access deny all
cache_peer ghs.google.com parent 80 0 no-query originserver name=to_ghs
cache_peer_access to_ghs allow ghs
cache_peer_access to_ghs deny all

即可.

保存好后,执行 squid -k reconfigure ,配置生效.

然后,添加一条 ghs.xiazhengxin.cn A记录到 vps ip就可以了.

待dns解析生效后,反向代理就做好了.

以后凡是用到 ghs.google.com 的地方,用ghs.xiazhengxin.cn 代替就可以了.

[ ] ( 1791 次浏览 ) 永久链接 ( 2.9 / 2376 )

<< <上一页 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 下一页> >>