惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Recent Announcements
Recent Announcements
IT之家
IT之家
Google DeepMind News
Google DeepMind News
罗磊的独立博客
爱范儿
爱范儿
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
U
Unit 42
MongoDB | Blog
MongoDB | Blog
S
SegmentFault 最新的问题
B
Blog
博客园 - 叶小钗
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

eallion's Blog

春假清明自驾游 Ubuntu 25.10 安装和配置 秋假 彩礼 2025 博客变化 预制菜 联邦礼仪之一 重拾写博客的乐趣 少儿 TED - 时间管理大师 n8n 之同步博客到 Mastodon n8n 之备份 Mastodon 嘟文 如何备份 Mastodon Docker 部署 Mastodon NAS 折腾记 Windows 11 安装软件 博客排版 - 挤压中文标点符号 Hugo 博客集成 Mastodon 独立博客自省问卷 15 题 Chrome 插件更新:网址净化器 在 Hugo 中使用 Shiki 炒菜万能公式 uBlacklist 订阅合集 读《中文互联网正在加速崩塌》 CSS 和 JS 实现博客热力图 受灾小记 那,他吃什么?! Mastodon 同步到 Memos Hugo 外部链接跳转提示页面 联邦宇宙及 Mastodon 简介 2024 博客变化
Oneinstack Nginx 反代 Google
Charles Chin · 2016-09-08 · via eallion's Blog

GetGoogle.org
(目前域名已经被墙,现在翻墙还是能够继续使用,但既然都能够翻墙了,也不需要用镜像来搜索了吧。:逃)

1、安装 oneinstack,如果只需要反代 Google,nginx 选择 y,其他全部选择 n;

2、安装编译 Nginx,当前版本为 1.10.1,注意用 nginx -V 查看一下 Nginx 版本号

cd ~/oneinstack/src 

下载源码

git clone https://github.com/cuber/ngx_http_google_filter_module 
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module
wget http://mirrors.linuxeye.com/oneinstack/src/pcre-8.38.tar.gz
wget http://mirrors.linuxeye.com/oneinstack/src/openssl-1.0.2h.tar.gz

解压

tar xzf pcre-8.38.tar.gz
tar xzf openssl-1.0.2h.tar.gz
tar xzf nginx-1.10.1.tar.gz
cd nginx-1.10.1

编译

./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-openssl=../openssl-1.0.2h --with-pcre=../pcre-8.38 --with-pcre-jit --with-ld-opt='-ljemalloc' --add-module=../ngx_http_google_filter_module --add-module=../ngx_http_substitutions_filter_module

make  #不需要 make install

mv /usr/local/nginx/sbin/nginx {,_`date +% m% d`}  #备份现有 nginx

cp objs/nginx/usr/local/nginx/sbin/  #更新 nginx

nginx -t  #检查 nginx 语法

service nginx restart

要正确使用 ngx_http_google_filter_module 模块,需要依赖扩展:

  • pcre 正则
  • ngx_http_proxy_module 反向代理
  • ngx_http_substitutions_filter_module 多重替换

3、安装 Let’s Encrypt,Oneinstack 已经集成了 Let’s Encrypt

cd /root/oneinstack
./addons.sh

选择 7,安装 Let’s Encrypt 即可。

4、绑定域名

cd /root/oneinstack
./vhost.sh

5、修改配置文件

vim /usr/local/nginx/conf/vhost/getgoogle.org.conf
 server {
    listen 443 ssl http2;
    server_name getgoogle.org www.getgoogle.org;
    ssl_certificate /etc/letsencrypt/live/getgoogle.org/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/getgoogle.org/privkey.pem;
    ssl_session_timeout 10m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers CHACHA20:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:RC4-SHA:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!DSS:!PKS;
    ssl_session_cache builtin:1000 shared:SSL:10m;
    resolver 8.8.8.8 8.8.4.4 valid=300s;
    resolver_timeout 5s;
    location / {
        google on;
        google_scholar on;
        google_language zh-CN;
        }
    }
 
 server {
     listen 80;
     server_name getgoogle.org www.getgoogle.org;
     rewrite ^(.*)$ https://$host$1 permanent;
     }

6、重启 Nginx

教程主要参考: https://blog.linuxeye.com/449.html