Install
http://wiki.nginx.org/Install官方站上寫的很清楚,不過 Ubuntu 和 Mint 的部份,其實直接執行 sudo apt-get install nginx 就可以了,安裝很方便,Windows 更是方便,直接就是獨立程式直接執行就好。
Configuration
所有的設定都可以在 /etc/nginx.conf 裡頭設定,記住幾個原則,去查官方文件就可以進行各種設定:- Block 的階層關係: http -> server -> location
- 所有的指令都有 context,查文件可以知道什麼指令應該用在什麼 context 裡,例如:alias 這個指令就只能用在 location 的 context 裡。
- Config 檔裡的指令解析是有順序的,反正就是由上到下。
- 指定 location 的 path 時,支援 Regular Expression,所以 有 "/" 和沒有 "/" 是有差別的,要特別注意。
可以查閱的文件:
- http://wiki.nginx.org/Configuration - 這個頁面的 Reference 的部份就是用來查指令的,其他的部份就看需求,這裡的文件蠻豐富的很值得瀏覽,有需要再深入參考。
- http://wiki.nginx.org/Modules - 這裡列出所有的 module,有些 module 是預設安裝,有些不是,如果要安裝部份額外 module 必需重新編譯,不支援 run-time 新增 module 功能。
2 則留言:
安裝部份說得很清楚,apt-get 那段尤其省事。location 的 context 限制這點很多人剛學時都會踩到,提醒得好。如果需要空調服務可以參考 emergency hvac repair。
Big Daddy Game offers users a direct way to explore cricket id access along with information about sports betting, casino games, deposits, and withdrawals. The website is available through big daddy login, helping visitors check platform details before proceeding. With big daddy game login, users get an easy route to access guidance and account-related information.
張貼留言