-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdefault.tmpl
More file actions
50 lines (41 loc) · 1.58 KB
/
default.tmpl
File metadata and controls
50 lines (41 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
server {
listen {{ .Env.NGINX_LISTEN }} default_server;
server_name _;
{{ if isTrue .Env.NGINX_HTTPS }}
listen {{ .Env.NGINX_LISTEN_HTTPS }} ssl http2;
ssl_certificate {{ .Env.NGINX_HTTPS_CERT }};
ssl_certificate_key {{ .Env.NGINX_HTTPS_CERT_KEY }};
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
{{ end }}
root {{ .Env.NGINX_ROOT }};
index {{ .Env.NGINX_INDEX }};
charset utf-8;
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
client_max_body_size {{ .Env.NGINX_CLIENT_MAX_BODY_SIZE }};
error_page 404 /index.php;
location / {
try_files $uri /{{ .Env.NGINX_INDEX }}?$query_string;
}
location ~ \.php$ {
fastcgi_buffers {{ .Env.NGINX_FASTCGI_BUFFERS }};
fastcgi_buffer_size {{ .Env.NGINX_FASTCGI_BUFFER_SIZE }};
fastcgi_pass {{ .Env.NGINX_PHP_FPM }};
fastcgi_read_timeout {{ .Env.NGINX_FASTCGI_READ_TIMEOUT }};
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
# good practices
add_header X-Frame-Options "SAMEORIGIN";
# basic H5BP suggestions
include h5bp/security/referrer-policy.conf;
include h5bp/security/x-content-type-options.conf;
include h5bp/cross-origin/requests.conf;
# performance enhancements (mostly for caching static data)
include h5bp/web_performance/cache-file-descriptors.conf;
include h5bp/web_performance/compression.conf;
}