The Daily Shaarli
Dans NGINX, les blocs "location" c'est un peu compliqué… pour savoir dans quel ordre est pris quoi, il faut s'accrocher un peu.
"To find location matching a given request, nginx first checks locations defined using the prefix strings (prefix locations). Among them, the location with the longest matching prefix is selected and remembered. Then regular expressions are checked, in the order of their appearance in the configuration file. The search of regular expressions terminates on the first match, and the corresponding configuration is used. If no match with a regular expression is found then the configuration of the prefix location remembered earlier is used."
Ce que je traduis par « le plus grand match sans regex (prefix location) est retenu puis on cherche dans les regex, on prend la première ; si pas de regex on prend le bloc retenu avant ».
J'ai pas tout essayé mais ça semble coïncider avec la réalité :P
En passant à nginx, ne pas oublier de réincorporer les blocages par htaccess à la config… ici un exemple pour dokuwiki.
Pour galette j'ai mis ça :
location ~ /(data|config|lib)/ {
deny all;
}
Besoin d'un dump partiel d'une base (pour réinjecter certaines modifications ailleurs par exemple) ? On peut donner une table et un where à mysqldump. On voudra aussi probablement -n et -t qui évitent d'avoir les CREATE de database et de table… sinon on perd tout le reste :)
Exemple pour sortir l'user 101 de galette :
mysqldump -n -t -u root -p galette galette_adherents --where="id_adh=101" > galette-adh.sql
