Browse Source

nginx: Add snippet for custom server block config.

pull/137/head
Brice Waegeneire 4 months ago
parent
commit
168b0fa9b7
  1. 7
      nginx/files/nginx/snippets/evolinux_server_custom
  2. 2
      nginx/templates/evolinux-default.conf.j2

7
nginx/files/nginx/snippets/evolinux_server_custom

@ -0,0 +1,7 @@
# Evolinux custom configuration, to be used in all server blocks
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;
}

2
nginx/templates/evolinux-default.conf.j2

@ -49,6 +49,8 @@ server {
stub_status on;
access_log off;
}
include /etc/nginx/snippets/evolinux_server_custom;
}
server {

Loading…
Cancel
Save