-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.conf
61 lines (49 loc) · 1.14 KB
/
site.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
55
56
57
58
59
60
61
server {
listen 443 http2 ssl;
listen [::]:443 http2 ssl;
server_name localhost;
root /var/www/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
ssl_certificate ./cert.pem;
ssl_certificate_key ./cert.key;
index index.php;
charset utf-8;
# brotli
brotli on;
brotli_comp_level 6;
brotli_buffers 16 8k;
brotli_min_length 20;
brotli_types
application/javascript
application/json
application/manifest+json
image/svg+xml
image/x-icon
image/png
image/jpg
image/webp
text/css
text/javascript
text/plain;
location / {
try_files $uri $uri/ /index.php?$query_string;
proxy_hide_header Content-Security-Policy;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
server {
listen 80;
server_name localhost;
return 301 https://$server_name$request_uri;
}