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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                #### Nginx的特點 * 擅長處理靜態小文件(1M) * 支持高并發(支持epoll模型) * 占用資源少 * 2W并發連接,10個進程,200M內存 * 配置簡單、靈活、輕量 * 功能豐富(Web、Proxy、Cache) * 工作在IOS第七層(支持限速、連接數限制等) #### Nginx基本功能 * 靜態服務(圖片、視頻、css、js、html) * 基于域名/IP/端口的虛擬主機 * Http/Https、SMTP、POP3反向代理 * TCP/UDP反向代理 * FastCGI、uWSGI反向代理 * 負載均衡 * 頁面緩存(CDN) * 支持gzip、expirse * URL Rewrite * 路徑識別 * 基于IP、用戶的訪問控制 * 支持訪問速率、并發限制 * 反向代理(適用2000WPV、并發連接1W/秒) #### Nginx原理 ##### master process 1. 與外界通訊和工作進程管理 2. 讀取nginx配置文件并驗證有效性 3. 建立、綁定和關閉Socket 4. 按照配置文件生成、管理和結束工作進程 5. nginx重啟、停止、重載配置文件、平滑升級、管理日志文件 ##### worker process 1. 接收客戶端請求,講請求交給各個功能模塊處理 2. 系統IO調用,獲取相應的數據,發送相應給客戶端 3. 數據緩存管理 4. 接收主進程指令,比如重啟、關閉 ##### 緩存索引重建及管理進程 cache模塊主要由緩存索引重建和緩存索引管理兩個進程完成,緩存索引重建進程是在nginx服務啟動一段時間后(默認1分鐘),由主進程生成,對本地磁盤的索引文件在內存中建立元數據,包括掃描、過期更新等操作,完成后退出 * 模塊只有使用時才加載 #### Nginx常用模塊 核心模塊 * Core functionality 標準模塊 * ngx\_http\_core\_module * ngx\_http\_access\_module * ngx\_http\_fastcgi\_module * ngx\_http\_gzip\_module * ngx\_http\_rewrite\_module * ngx\_http\_upstream\_module * ngx\_http\_proxy\_module * ngx\_http\_limit\_conn\_module * ngx\_http\_limit\_req\_module * ngx\_http\_auth\_basic\_module * ngx\_http\_log\_module * ngx\_http\_ssl\_module * ngx\_http\_status\_module * ngx\_http\_realip\_module #### Nginx(Proxy)支持的算法 rr 輪詢wrr 權重輪詢iphash hash算法(解決session命中)urlhash hash算法fair 動態算法(響應時間最短) ### Nginx部署(1.8.1) #### 安裝依賴 ~~~ yum install openssl-devel pcre-devel pcre gcc zlib -y ~~~ * pcre 正則處理需要 * gcc 編譯需要 * zlib 壓縮需要 * openssl 安全鏈接需要 ~~~ #### 基本操作 ~~~ #啟動 /app/nginx/sbin/nginx #停止 /app/nginx/sbin/nginx -s stop # 檢查語法 /app/nginx/sbin/nginx -t #重啟 /app/nginx/sbin/nginx -s #重啟原理:生成基于新配置的線程,新請求轉發到新線程,舊線程處理完成后停止。 ~~~ Options: -?,-h : this help -v : show version and exit -V : show version and configure options then exit -t : test configuration and exit -T : test configuration, dump it and exit -q : suppress non-error messages during configuration testing -s signal : send signal to a master process: stop, quit, reopen, reload -p prefix : set prefix path (default: /usr/local/nginx/) -c filename : set configuration file (default: conf/nginx.conf) -g directives : set global directives out of configuration file ~~~
                  <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>

                              哎呀哎呀视频在线观看