Carnet Wiki

Nginx et Spip

Version 4 — Avril 2022 JLuc

Rastapop : « Maintenant que nginx a dépassé Apache, je pense que tout logiciel web doit fournir la conf nginx aussi. »

https://www.spip.net/fr_article4351.html fournit une recette nginx « de base »

Quelques liens complémentaires

-  recette : https://github.com/nginxinc/nginx-wiki/blob/master/source/start/topics/recipes/spip.rst
-  configuration exemple (2019) : https://www.nginx.com/resources/wiki/start/topics/recipes/spip/
-  notes concernant la config utilisée sur seenthis.net : " class="spip_url spip_out auto" rel="nofollow external">https://github.com/seenthis/hebergement/wiki/Configuration-nginx
-   [la config du site de William Piedfort->https://discuter . spip.net/t/montees-en-systeme-trop-rapides/160238/7]  ;

server {
server_name mondomaine ; listen xx.xx.xxx.xxx;


# special à mon squelette
rewrite ^/groupe_mots(\d+).html$ /spip.php?page=groupe_mots&groupe=$1 last;
rewrite ^/sitemap\.xml$ /spip.php?page=sitemap.xml last;
}


# .well-known doit resté accessible pour Lets Encrypt
location ~ /\.well-known/acme-challenge {
allow all;
}


# On interdit l'accès au dotfiles
location ~ /\. { deny all; access_log off; log_not_found off; }