首先要感谢wen.lu的开源。参见GitHub地址:
https://github.com/cuber/ngx_http_google_filter_module
中文的说明文档:
https://github.com/cuber/ngx_http_google_filter_module/blob/master/README.zh-CN.md
有GitHub的可以fork一份到自己的主页。具体内容我就不复制过来了。
感谢V2EX。http://www.v2ex.com/t/154344
其次要准备一台VPS,要在墙外(美国、日本、香港等,推荐Bandwagonhost,搬瓦工VPS中文网:www.bandwagonhost.cn)。最好是装上Ubuntu14.04系统,因为目前网上流传的教程都是基于这个系统。下面开始教程。
二、教程
教程来自兽兽的通天塔,原文链接:http://ttt.tt/162/
为防编辑,我复制如下:
一、编译安装 Nginx
1、首先更新下系统
sudo apt-get update && sudo apt-get upgrade
2、安装的 Nginx 需要的包以及 Git
sudo apt-get install libpcre3 libpcre3-dev zlib1g-dev libssl-dev build-essential git
3、新建立个 Nginx 目录,方便管理
mkdir nginx && cd nginx
下载 Nginx 最新稳定版,目前的版本是
1.6.2
,用 Git 克隆两个 Nginx 模块,一个是 wen.lu 开源的 ngx_http_google_filter_module,另一个是 Nginx 替换关键词模块 ngx_http_substitutions_filter_modulewget http://nginx.org/download/nginx-1.6.2.tar.gz tar -xvf nginx-1.6.2.tar.gz git clone https://github.com/cuber/ngx_http_google_filter_module git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module