-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
54 lines (39 loc) · 1.85 KB
/
nginx.conf
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
51
52
53
54
# https://nginx.org/en/docs/ngx_core_module.html#user
user www-data;
# https://nginx.org/en/docs/ngx_core_module.html#pid
pid /var/run/nginx.pid;
# https://nginx.org/en/docs/ngx_core_module.html#worker_processes
worker_processes auto;
# https://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_nofile
worker_rlimit_nofile 8192;
# https://nginx.org/en/docs/ngx_core_module.html#pcre_jit
prce_jit on;
# https://nginx.org/en/docs/ngx_core_module.html#include
include /etc/nginx/conf.d/modules/*.conf;
events {
# https://nginx.org/en/docs/ngx_core_module.html#worker_connections
worker_connections 4096;
}
http {
# https://nginx.org/en/docs/ngx_core_module.html#include
include mime.types;
# https://nginx.org/en/docs/http/ngx_http_core_module.html#default_type
default_type application/octet-stream;
# https://nginx.org/en/docs/http/ngx_http_charset_module.html#charset
charset utf-8;
# https://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_bucket_size
server_names_hash_bucket_size 64;
# https://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_max_size
server_names_hash_max_size 512;
# https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout
keepalive_timeout 20s;
# https://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens
server_tokens off;
# https://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Frame-Options "DENY" always;
add_header Content-Security-Policy "default-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# https://nginx.org/en/docs/ngx_core_module.html#include
include conf.d/*.conf;
}