<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 9. 用 nginx 搭建谷歌鏡像網站 #### 1. 介紹 搭建類似`http://tokillgoogle.com/`這樣的網站,只是能讓我們訪問google.com。用的工具是[ngx\_http\_google\_filter\_module](https://github.com/cuber/ngx_http_google_filter_module),是一個nginx的插件,用的原理是nginx的反向代理。 #### 2. 編譯安裝 首先要有一臺能訪問google.com的vps或云主機,并且確保之前編譯安裝過nginx。 這個插件依賴于`ngx_http_substitutions_filter_module`這個庫。 ``` $ git clone https://github.com/cuber/ngx_http_google_filter_module $ git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module ``` ``` $ cd nginx $ ./configure \ --user=nginx \ --group=nginx \ --prefix=/etc/nginx \ --sbin-path=/usr/sbin/nginx \ --conf-path=/etc/nginx/nginx.conf \ --pid-path=/var/run/nginx.pid \ --lock-path=/var/run/nginx.lock \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --with-http_gzip_static_module \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-pcre \ --with-file-aio \ --with-http_realip_module \ --without-http_scgi_module \ --without-http_uwsgi_module \ --without-http_fastcgi_module \ --add-module=/home/ubuntu/softs/ngx_http_google_filter_module \ --add-module=/home/ubuntu/softs/ngx_http_substitutions_filter_module \ ``` 具體的編譯參數可以通過`nginx -V`查到。 `--add-module`指定插件的保存位置。 接下來編譯安裝。 ``` $ make $ sudo make install ``` 重啟服務。 ``` $ sudo make upgrade ``` 還可以用`nginx -V`查看是否編譯成功。 #### 3. 配置使用 打開配置文件`/etc/nginx/nginx.conf`。 ``` server { # ... part of server configuration resolver 8.8.8.8; location / { google on; } # ... } ``` 找到server部分,添加`resolver`和`location`兩個指令,總共四行。 讓配置文件生效。 ``` $ sudo nginx -s reload ``` 成功,看到效果。 ![](https://box.kancloud.cn/b1bfe82ea77ee66f35cff85c4d1b9c34_926x794.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看