Course Code: httpngx
Duration: 21 hours
Prerequisites:

參與者必須熟悉 Linux 命令行,並具有 TCP/IP 的工作知識

Overview:

本課程面向希望能夠配置和監控Web服務器的系統管理員。它既關注HTTP背後的一般理論,又在實踐方面展示了一個特定的高性能Web服務器Nginx。

Course Outline:
  1. HTTP/1.x 協定
    1. 請求和回應格式
    2. 使用 tcpdump 和 Wireshark 檢查 HTTP 會話
    3. 在 Web 瀏覽器中檢查 HTTP 標頭
    4. 使用 CURL 發出請求
    5. 常見標頭
    6. 請求流水線
    7. 內容長度和分塊編碼
    8. MIME 類型
  2. Nginx 安裝
    1. 從 Debian 套件安裝 nginx
    2. nginx 的變體在 Debian 和 Ubuntu 中可用
    3. 從源安裝nginx
    4. 啟動 nginx
    5. 升級nginx
  3. Nginx 作為靜態檔伺服器
    1. 配置檔的一般結構
    2. 設置虛擬主機
    3. 配置位置
    4. 位置查找順序
    5. 設置錯誤頁面
    6. 發出重定向
    7. 其他形式的 URL 重寫
    8. 提供空 GIF 影像
    9. 內部和命名位置
    10. 覆蓋MIME類型
  4. 用戶端性能優化
    1. 允許客戶端快取資源
    2. Vary: 標頭
    3. 最小化請求數
    4. 保持活動狀態
    5. 如果資源需要更改怎麼辦
    6. Web 框架如何處理靜態檔
  5. 內容後處理
    1. Gzip 壓縮
    2. 圖像縮放
  6. Access 控制
    1. 根據IP位址限制對檔的訪問
    2. 地理限制
    3. 隱藏 VCS 目錄和私有檔
    4. 基本身份驗證
    5. 其他類型的身份驗證
    6. 組合限制
    7. 安全連結
  7. 應用限制
    1. 流量整形
    2. 為了限制
    3. 速率限制請求
    4. 限制同時連接
  8. Nginx 作為反向代理
    1. 支援的上游協定
    2. 處理自簽名的上游 SSL 證書
    3. 將參數傳遞給FastCGI和uWSGI後端
    4. 代理 websocket 連接
    5. X-Accel-* 標頭
    6. 修改上游接收和發送的標頭
  9. 特定於語言的反向代理設置
    1. PHP
    2. Python
    3. Ruby
  10. Nginx 作為 SSL 終止符
    1. 生成自簽名 SSL 證書
    2. 從 Let's Encrypt 獲取證書
    3. 限制可用密碼
    4. 使用會話票證
    5. 裝訂 OCSP 回應
    6. 驗證 SSL 配置
    7. 接受客戶端證書
    8. HTTP/2 注意事項
  11. 使用 Nginx 進行負載均衡
    1. 定義上游組
    2. 使用 ip_hash的粘性會話
    3. Nginx Plus 作為負載均衡器的額外功能
    4. Nginx 和 Nginx Plus 的替代項
    5. 將另一個 Nginx 放在 Nginx 負載均衡器後面
    6. Nginx 落後於 HAProxy 或 AWS 負載均衡器
  12. Nginx 作為緩存
    1. 告訴 nginx 快取頁面
    2. nginx 如何應對與標準緩存相關的 header
    3. 緩存的可調參數
    4. Nginx 快取與應用程式級快取
    5. 清除緩存
  13. 使用 Nginx 部署流行的 Web 應用程式
    1. 要討論的應用程式清單由培訓師決定
  14. 伐木
    1. Access 紀錄和錯誤紀錄檔
    2. 指定自訂日誌格式
    3. 跟蹤緩慢的請求
    4. 優化記錄
    5. 日誌輪換
    6. 通過外部程序進行日誌分析
  15. 監控 Nginx
    1. Nginx 存根狀態頁面
    2. Nginx 新增擴展實時狀態頁面
    3. 監控系統通常繪製和警告的內容 Nginx
  16. [可選]使用 Nginx¹ 實現高可用性
    1. 如何將相同的靜態內容部署到多個伺服器
    2. 配置共用
    3. 使用彈性/虛擬IP位址進行故障轉移
    4. 使用 Keepalived 設置 VRRP
    5. 其他高可用性堆疊
    6. Nginx 以及與 Keepalived 的集成
  17. 與 Nginx 配置相關的常見錯誤和安全問題
  18. 常見性能問題

¹ 高可用性部分涉及使入侵檢測系統不滿意的網路設置,或者需要為每個參與者設置多個虛擬機(其他主題不需要)。因此,預設情況下不提供它。

Sites Published:

United Arab Emirates - HTTP fundamentals and Nginx web server

Qatar - HTTP fundamentals and Nginx web server

Egypt - HTTP fundamentals and Nginx web server

Saudi Arabia - HTTP fundamentals and Nginx web server

South Africa - HTTP fundamentals and Nginx web server

Brasil - HTTP fundamentals and Nginx web server

Canada - HTTP fundamentals and Nginx web server

中国 - HTTP fundamentals and Nginx web server

香港 - HTTP fundamentals and Nginx web server

澳門 - HTTP fundamentals and Nginx web server

台灣 - HTTP fundamentals and Nginx web server

USA - HTTP fundamentals and Nginx web server

Österreich - HTTP fundamentals and Nginx web server

Schweiz - HTTP fundamentals and Nginx web server

Deutschland - HTTP fundamentals and Nginx web server

Czech Republic - HTTP fundamentals and Nginx web server

Denmark - HTTP fundamentals and Nginx web server

Estonia - HTTP fundamentals and Nginx web server

Finland - HTTP fundamentals and Nginx web server

Greece - HTTP fundamentals and Nginx web server

Magyarország - HTTP fundamentals and Nginx web server

Ireland - HTTP fundamentals and Nginx web server

Luxembourg - HTTP fundamentals and Nginx web server

Latvia - HTTP fundamentals and Nginx web server

España - Fundamentos HTTP y servidor web Nginx

Italia - HTTP fundamentals and Nginx web server

Lithuania - HTTP fundamentals and Nginx web server

Nederland - HTTP fundamentals and Nginx web server

Norway - HTTP fundamentals and Nginx web server

Portugal - HTTP fundamentals and Nginx web server

România - HTTP fundamentals and Nginx web server

Sverige - HTTP fundamentals and Nginx web server

Türkiye - HTTP fundamentals and Nginx web server

Malta - HTTP fundamentals and Nginx web server

Belgique - HTTP fundamentals and Nginx web server

France - HTTP fundamentals and Nginx web server

日本 - HTTP fundamentals and Nginx web server

Australia - HTTP fundamentals and Nginx web server

Malaysia - HTTP fundamentals and Nginx web server

New Zealand - HTTP fundamentals and Nginx web server

Philippines - HTTP fundamentals and Nginx web server

Singapore - HTTP fundamentals and Nginx web server

Thailand - HTTP fundamentals and Nginx web server

Vietnam - HTTP fundamentals and Nginx web server

India - HTTP fundamentals and Nginx web server

Argentina - Fundamentos HTTP y servidor web Nginx

Chile - Fundamentos HTTP y servidor web Nginx

Costa Rica - Fundamentos HTTP y servidor web Nginx

Ecuador - Fundamentos HTTP y servidor web Nginx

Guatemala - Fundamentos HTTP y servidor web Nginx

Colombia - Fundamentos HTTP y servidor web Nginx

México - Fundamentos HTTP y servidor web Nginx

Panama - Fundamentos HTTP y servidor web Nginx

Peru - Fundamentos HTTP y servidor web Nginx

Uruguay - Fundamentos HTTP y servidor web Nginx

Venezuela - Fundamentos HTTP y servidor web Nginx

Polska - HTTP fundamentals and Nginx web server

United Kingdom - HTTP fundamentals and Nginx web server

South Korea - HTTP fundamentals and Nginx web server

Pakistan - HTTP fundamentals and Nginx web server

Sri Lanka - HTTP fundamentals and Nginx web server

Bulgaria - HTTP fundamentals and Nginx web server

Bolivia - Fundamentos HTTP y servidor web Nginx

Indonesia - HTTP fundamentals and Nginx web server

Kazakhstan - HTTP fundamentals and Nginx web server

Moldova - HTTP fundamentals and Nginx web server

Morocco - HTTP fundamentals and Nginx web server

Tunisia - HTTP fundamentals and Nginx web server

Kuwait - HTTP fundamentals and Nginx web server

Oman - HTTP fundamentals and Nginx web server

Slovakia - HTTP fundamentals and Nginx web server

Kenya - HTTP fundamentals and Nginx web server

Nigeria - HTTP fundamentals and Nginx web server

Botswana - HTTP fundamentals and Nginx web server

Slovenia - HTTP fundamentals and Nginx web server

Croatia - HTTP fundamentals and Nginx web server

Serbia - HTTP fundamentals and Nginx web server

Bhutan - HTTP fundamentals and Nginx web server

Nepal - HTTP fundamentals and Nginx web server

Uzbekistan - HTTP fundamentals and Nginx web server