Nginx簡單配置

2022-04-12 07:26:23 字數 442 閱讀 7842

一、屬性說明

1.$remote_addr 與$http_x_forwarded_for 用以記錄客戶端的 ip 位址;

2.$remote_user :用來記錄客戶端使用者名稱;

3.$time_local : 用來記錄訪問時間與時區;

4.$request : 用來記錄請求的 url 與 http 協議;

5.$status : 用來記錄請求狀態;成功是 200;

6.$body_bytes_s ent :記錄傳送給客戶端檔案主體內容大小;

7.$http_referer :用來記錄從那個頁面鏈結訪問過來的;

8.$http_user_agent :記錄客戶端瀏覽器的相關資訊;

二、驚群現象:乙個網路連線到來,多個睡眠的程序被同事叫醒,但只有乙個程序能獲得鏈結,這樣會影響系統效能。

三、每個指令必須有分號結束。

nginx 簡單配置

server 檔案快取 js css檔案快取 location js css 不把css js image相應的資源檔案寫入快取,會導致資源檔案404,無法被訪問。至於快取的時間長短可以自己設定。在nginx的location和配置中location的順序沒有太大關係。與location表示式的型別...

簡單配置nginx

在mac下配置nginx 1,安裝 brew install nginx 2,啟動nginx 在終端鍵入 nginx 回車 3,在瀏覽器裡輸入localhost 8080 出現welcome to nginx 說明成功 安裝 nginx v 檢視版本號 4 cd usr local etc ngin...

nginx簡單配置

nginx.conf root html 目錄 通過官方檢視模組幫助 client body temp conf fastcgi.conf 動態配置 fastcgi.conf.default fastcgi params 引數 fastcgi params.default koi utf koi w...