<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 功能強大 支持多語言、二開方便! 廣告
                ### 模塊編譯順序[](http://tengine.taobao.org/book/chapter_09.html#id1 "永久鏈接至標題") 上一節中,提到過,nginx模塊的順序很重要,會直接影響到程序的功能。而且,nginx和部分模塊,也有著自己特定的順序要求,比如ngx_http_write_filter_module模塊一定要在filter模塊的最后一步執行。想查看模塊的執行順序,可以在objs/ngx_modules.c這個文件中找到,這個文件在configure之后生成,上一節中,我們看過這個文件里面的內容。 下面是一個ngx_modules.c文件的示例: [](http:// "點擊提交Issue,反饋你的意見...") ngx_module_t *ngx_modules[] = { // 全局core模塊 &ngx_core_module, &ngx_errlog_module, &ngx_conf_module, &ngx_emp_server_module, &ngx_emp_server_core_module, // event模塊 &ngx_events_module, &ngx_event_core_module, &ngx_kqueue_module, // 正則模塊 &ngx_regex_module, // http模塊 &ngx_http_module, &ngx_http_core_module, &ngx_http_log_module, &ngx_http_upstream_module, // http handler模塊 &ngx_http_static_module, &ngx_http_autoindex_module, &ngx_http_index_module, &ngx_http_auth_basic_module, &ngx_http_access_module, &ngx_http_limit_conn_module, &ngx_http_limit_req_module, &ngx_http_geo_module, &ngx_http_map_module, &ngx_http_split_clients_module, &ngx_http_referer_module, &ngx_http_rewrite_module, &ngx_http_proxy_module, &ngx_http_fastcgi_module, &ngx_http_uwsgi_module, &ngx_http_scgi_module, &ngx_http_memcached_module, &ngx_http_empty_gif_module, &ngx_http_browser_module, &ngx_http_upstream_ip_hash_module, &ngx_http_upstream_keepalive_module, //此處是第三方handler模塊 // http filter模塊 &ngx_http_write_filter_module, &ngx_http_header_filter_module, &ngx_http_chunked_filter_module, &ngx_http_range_header_filter_module, &ngx_http_gzip_filter_module, &ngx_http_postpone_filter_module, &ngx_http_ssi_filter_module, &ngx_http_charset_filter_module, &ngx_http_userid_filter_module, &ngx_http_headers_filter_module, // 第三方filter模塊 &ngx_http_copy_filter_module, &ngx_http_range_body_filter_module, &ngx_http_not_modified_filter_module, NULL }; http handler模塊與http filter模塊的順序很重要,這里我們主要關注一下這兩類模塊。 http handler模塊,在后面的章節里面會講到多階段請求的處理鏈。對于content phase之前的handler,同一個階段的handler,模塊是順序執行的。比如上面的示例代碼中,ngx_http_auth_basic_module與ngx_http_access_module這兩個模塊都是在access phase階段,由于ngx_http_auth_basic_module在前面,所以會先執行。由于content phase只會有一個執行,所以不存在順序問題。另外,我們加載的第三方handler模塊永遠是在最后執行。 http filter模塊,filter模塊會將所有的filter handler排成一個倒序鏈,所以在最前面的最后執行。上面的例子中,&ngx_http_write_filter_module最后執行,ngx_http_not_modified_filter_module最先執行。注意,我們加載的第三方filter模塊是在copy_filter模塊之后,headers_filter模塊之前執行。
                  <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>

                              哎呀哎呀视频在线观看