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
|
server {
listen 80;
listen 443 ssl;
server_name XXX.XXXX.XXX;
ssl_certificate certs/XXX.XXXX.XXX.pem;
ssl_certificate_key certs/XXX.XXXX.XXX.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;
ssl_prefer_server_ciphers on;
access_log logs/blog_access.log accesslog;
error_log logs/blog_error.log;
# 开启 modsecurity,并指定规则文件路径
modsecurity on;
modsecurity_rules_file /usr/local/platform/openresty/nginx/conf/configs/owasp-modsecurity-crs/modsecurity-include.conf;
# end
location ~* \.well-known/ {
root html;
}
location ~* / {
root /usr/local/platform/webroot/xiang-blog/;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
|