Outils pour utilisateurs

Outils du site


informatique:nginx

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
informatique:nginx [17/02/2021 21:10] – typo cyrilleinformatique:nginx [21/09/2023 11:47] (Version actuelle) – [Nginx auth request] cyrille
Ligne 26: Ligne 26:
 ==== WAF (Web Application Firewall) ==== ==== WAF (Web Application Firewall) ====
  
-  * Mod Security+  * ModSecurity 
 +    * [[https://blog.wpsec.com/wordpress-modsecurity-waf/|Protecting WordPress with Open Source Web Application Firewall ModSecurity]]
     * [[https://medium.com/building-goalwise/how-to-implement-modsecurity-waf-with-nginx-15fdd42fa3|How to implement ModSecurity WAF with NGINX]] 2019 (Installing ModSecurity v3)     * [[https://medium.com/building-goalwise/how-to-implement-modsecurity-waf-with-nginx-15fdd42fa3|How to implement ModSecurity WAF with NGINX]] 2019 (Installing ModSecurity v3)
     * [[https://geekflare.com/install-modsecurity-on-nginx/|How to Install & Configure ModSecurity on Nginx]] 2018     * [[https://geekflare.com/install-modsecurity-on-nginx/|How to Install & Configure ModSecurity on Nginx]] 2018
Ligne 35: Ligne 36:
  
 ==== Autre ==== ==== Autre ====
 +
 +[[/informatique/securite/crowdsec|Crowdsec]]
  
   * Bunkerized Nginx   * Bunkerized Nginx
Ligne 43: Ligne 46:
 ===== Tips & Tricks ===== ===== Tips & Tricks =====
  
-==== Optimize Nginx ====+==== Nginx auth request ====
  
 +Nginx peut authentifier des requêtes en effectuant une requête intermédiaire auprès d'un service (//HTTP subrequest to an external server//). C'est le module ''[[https://nginx.org/en/docs/http/ngx_http_auth_request_module.html|ngx_http_auth_request_module]]'' qui le permet, présent dès ''nginx-light''.
 +
 +Utile pour servir des fichiers statiques aux seuls utilisateurs connectés ce qui évite de monopoliser un slot du moteur d'application (python, php, ...) pour servir un fichier.
 +
 +  * [[https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/|Authentication Based on Subrequest Result]]
 +  * [[https://www.danielwerner.dev/how-to-authorize-static-files-in-laravel-with-nginx-auth-request|Tuto avec Laravel]]
 +
 +==== Letsencrypt certbot reload ====
 +
 +''Certbot'' sur les debian récentes utilisent un ''systemd timer''. Pour reloader ''nginx'' après un renouvellement de certificat il faut créer un script du genre :
 +
 +''/etc/letsencrypt/renewal-hooks/deploy/01-reload-nginx'' :
 +<code bash>
 +#!/bin/sh
 +# set -e
 +systemctl reload nginx
 +</code>
 +
 +==== Optimize Nginx ====
  
 [[https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration|How To Optimize Nginx Configuration]] [[https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration|How To Optimize Nginx Configuration]]
 +
 +==== Logging ====
 +
 +  * [[https://gock.net/blog/2020/nginx-conditional-logging-responses/|NGINX conditional logging and responses]] (2020-11)
  
 ==== more than one worker process ==== ==== more than one worker process ====
informatique/nginx.1613592639.txt.gz · Dernière modification : 17/02/2021 21:10 de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki