<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ### Nginx追加模塊 備注:網上有同學說只make不make install,會覆蓋,但是Nginx在make install時,會判斷文件是否存在,如果存在則不會進行創建和覆蓋。 #### 查看Nginx 編譯參數 /app/nginx/sbin/nginx -V #### 追加第三方模塊 安裝Nginx echo模塊 ```shell cd /opt/ git clone https://github.com/openresty/echo-nginx-module.git@1.8.x cd /opt/nginx-1.8.1 ./configure --prefix=/app/nginx-1.8.1 --user=nginx --group=nginx --add-module=/opt/1.8.x/ make && make install ``` #### 追加自身模塊 安裝RealIP模塊,在有CDN或多層反向代理的情況下,獲取用戶真實IP ```shell cd /opt/nginx-1.8.1 ./configure --prefix=/app/nginx-1.8.1 --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module make && make install ``` ### Nginx(Web)獲取客戶端真實IP - 安裝RealIP模塊,在有CDN或多層反向代理的情況下,獲取用戶真實IP #### 基礎架構 L1-Nginx(proxy)-->L2-Nginx(proxy)-->Nginx(Web) #### 增加realip模塊 ```shell cd /opt/nginx-1.8.1 ./configure --prefix=/app/nginx-1.8.1 --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module make && make install ``` #### Server模塊中配置 ```shell set_real_ip_from 10.0.0.0/24; set_real_ip_from 192.168.0.0/24; real_ip_header X-Forwarded-For; real_ip_recursive on; ``` - set_real_ip_from:告訴nginx,192.168.0.109是我們的反向代服務器不是真實的用戶IP - real_ip_header:告訴nginx真正的用戶IP是存在X-Forwarded-For請求頭中 - 當real_ip_recursive為off時,nginx會把real_ip_header指定的HTTP頭中的最后一個IP當成真實IP - 當real_ip_recursive為on時,nginx會把real_ip_header指定的HTTP頭中的最后一個不是信任服務器的IP當成真實IP #### 三種在CDN環境下獲取用戶IP方法總結 - CDN自定義header頭 優點:獲取到最真實的用戶IP地址,用戶絕對不可能偽裝IP Ucloud為例https://docs.ucloud.cn/storage_cdn/ucdn/faq.html 缺點:需要CDN廠商提供 - 程序獲取forwarded-for頭 優點:可以獲取到用戶的IP地址 缺點:程序需要改動,以及用戶IP有可能是偽裝的 - 使用realip獲取 優點:程序不需要改動,直接使用remote_addr即可獲取IP地址 缺點:ip地址有可能被偽裝,而且需要知道所有CDN節點的ip地址或者ip段
                  <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>

                              哎呀哎呀视频在线观看