-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstatamic.conf
46 lines (44 loc) · 1.17 KB
/
statamic.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
server {
listen 8000;
listen [::]:8000;
root /var/www/statamic;
index server.php;
charset utf-8;
location / {
try_files $uri $uri/ /public/$uri $uri /server.php?$query_string;
}
location /cp {
try_files $uri /server.php?$query_string;
}
client_max_body_size 12M;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
# access_log on;
# error_log on;
error_page 404 /server.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass fpm:9000;
fastcgi_index server.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_read_timeout 300;
}
# Block access to content/data files
location ~* /(.*)\.(?:md|yaml|textile)$ {
deny all;
return 404;
}
# Block access to the Statamic app
# location ^~ /statamic {
# deny all;
# return 404;
# }
# Enable gzip compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript text/xml text/css;
gzip_vary on;
}