-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault
116 lines (93 loc) · 2.36 KB
/
default
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
server {
client_max_body_size 600m;
client_header_buffer_size 1k;
client_body_buffer_size 256k;
large_client_header_buffers 4 16k;
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/html;
index index.php index.html index.htm;
server_name _;
charset utf-8;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$query_string;
# Remove index.php
rewrite ^/index\.php(.*) $1 permanent;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location ^~ /.well-known/acme-challenge/ {
allow all;
root /var/www/html;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
# Point to our PHP FPM docker container.
#fastcgi_pass phpfpm:9000;
}
location ~* (?:^|/)\. {
access_log off;
log_not_found off;
deny all;
}
location = /favicon.ico {
access_log off;
log_not_found off;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
location ~* (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
access_log off;
log_not_found off;
deny all;
}
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
access_log off;
log_not_found off;
try_files $uri /index.php?$query_string;
expires -1;
}
location ~* \.(?:rss|atom)$ {
access_log off;
log_not_found off;
try_files $uri /index.php?$query_string;
expires 1h;
add_header Cache-Control "public";
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
access_log off;
log_not_found off;
try_files $uri /index.php?$query_string;
expires 360d;
add_header Cache-Control "public";
}
location ~* \.(?:css|js)$ {
access_log off;
log_not_found off;
try_files $uri /index.php?$query_string;
expires 1y;
add_header Cache-Control "public";
}
location ~* \.(?:ttf|ttc|otf|eot|woff)$ {
access_log off;
log_not_found off;
try_files $uri /index.php?$query_string;
expires 1M;
add_header Cache-Control "public";
}
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
location ~ /\.ht {
access_log off;
log_not_found off;
deny all;
}
}