-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf.ini
85 lines (71 loc) · 2.21 KB
/
nginx.conf.ini
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
user jekyll;
worker_processes auto;
pid /tmp/nginx.pid;
daemon off;
events {
worker_connections 1024;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# webserver
log_format graylog2_webserver_json '{
"nginx_server_type": "webserver",
"server_name": "$host",
"host": "$host",
"time_iso8601": "$time_iso8601",
"remote_addr": "$remote_addr",
"remote_user": "$remote_user",
"body_bytes_sent": "$body_bytes_sent",
"request_time": "$request_time",
"status": "$status",
"request": "$request",
"request_method": "$request_method",
"http_referrer": "$http_referer",
"http_user_agent": "$http_user_agent",
"request_scheme": "$scheme",
"request_body": "$request_body",
"request_uri": "$request_uri"
}';
access_log $av_logging;
error_log /dev/stdout error;
sendfile on;
keepalive_timeout 15;
keepalive_disable msie6;
keepalive_requests 100;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
fastcgi_temp_path /tmp/fastcgi 1 2;
client_body_temp_path /tmp/client_body 1 2;
proxy_temp_path /tmp/proxy 1 2;
uwsgi_temp_path /tmp/uwsgi 1 2;
scgi_temp_path /tmp/scgi 1 2;
gzip on;
server {
listen 8888;
root /var/www/html/_site/;
client_max_body_size 2000M;
fastcgi_buffers 64 4K;
error_page 404 = @notfound;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";
add_header X-Frame-Options sameorigin always;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag all;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
if ($host !~ ^www\.) {
return 301 $scheme://www.$host$request_uri;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location @notfound {
return 301 $scheme://$host/index.html;
}
}
}