nginx phases 詳細介紹

2021-05-23 15:02:33 字數 1162 閱讀 5917

我們知道,nginx 請求分為下面幾個階段:

下面對這些過程詳細介紹:

一  ngx_http_post_read_phase

do nothing

二  ngx_http_server_rewrite_phase

do nothing

三 ngx_http_find_config_phase

根據請求的位置,去查詢對應的 loc_conf ,具體過程可以模組定位 中介紹。

四 ngx_http_rewrite_phase

五 ngx_http_post_rewrite_phase,     

六 ngx_http_preaccess_phase,

七 ngx_http_access_phase,       

這個階段有兩個handler 

八 ngx_http_post_access_phase,

直接呼叫 ngx_http_core_post_access_phase函式 (ngx_http_core_module.c)。現在基本沒有幹什麼事情

九 ngx_http_try_files_phase,

十 ngx_http_content_phase,      

直接呼叫 ngx_http_core_content_phase()來生成內容

預設的情況下,這個包含三個handler:

ngx_http_index_module.c         : 如果是目錄,那麼在index後面的檔案中選擇乙個進行跳轉

ngx_http_static_module.c            處理靜態的檔案

十一 ngx_http_log_phase

robots txt詳細介紹

robots.txt基本介紹 當乙個搜尋機械人 有的叫搜尋蜘蛛 訪問乙個站點時,它會首先檢查該站點根目錄下是否存在robots.txt,如果存在,搜尋機械人就會按照該檔案中的內容來確定訪問的範圍 如果該檔案不存在,那麼搜尋機械人就沿著鏈結抓取。另外,robots.txt必須放置在乙個站點的根目錄下,...

NSString詳細介紹

字串是程式設計最常用的資料型別之一了。在mac iphone程式設計中,蘋果為我們提供了乙個不同的字串型別nsstring。有別與普通的string為資料型別,nsstring其實是乙個物件型別。nsstring是nsobject cocoa foundation的基礎物件 的子類,所以具有nsob...

Merge into 詳細介紹

merge語句是oracle9i新增的語法,用來合併update和insert語句。通過merge語句,根據一張表或子查詢的連線條件對另外一張表進行查詢,連線條件匹配上的進行update,無法匹配的執行insert。這個語法僅需要一次全表掃瞄就完成了全部工作,執行效率要高於insert update...