-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypechohttp.conf
39 lines (33 loc) · 888 Bytes
/
typechohttp.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
server {
listen 0.0.0.0:80;
server_name yourdomain.com;
index index.php;
root /typecho;
access_log /var/log/nginx/typecho_access.log main;
if (!-e $request_filename){
rewrite ^(.*)$ /index.php$1 last;
}
location ~ /.well-known {
allow all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 1h;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
location ~ /\. {
deny all;
}
# fastcgi
location ~ [^/]\.php(/|$) {
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
try_files $fastcgi_script_name =404;
fastcgi_param SCRIPT_FILENAME /typecho/$fastcgi_script_name;
}
}