ajout de snippets/evolinux_server_custom

This commit is contained in:
Gregory Colpart 2024-04-23 09:56:48 +02:00
parent d7a396298f
commit 3f1d3b9cec

View file

@ -118,6 +118,16 @@ server_name_in_redirect off;
index index.html;
~~~
Le fichier `nginx/snippets/evolinux_server_custom` contient notre configuration à inclure dans chaque bloc "server" :
~~~
location ~ /\.(inc|git|bak|env) {
# We don't want to let the client know a file exist on the server,
# so we return 404 "Not found" instead of 403 "Forbidden".
return 404;
}
~~~
Le fichier `/etc/nginx/snippets/ipaddr_whitelist` centralise les adresses IP privilégiées, on peut ainsi utiliser `include /etc/nginx/snippets/ipaddr_whitelist;` à différents endroits dans la configuration de Nginx sans dupliquer ces adresses :
~~~