forked from AsyncMe/Moonshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.default.conf
66 lines (57 loc) · 1.95 KB
/
nginx.default.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
62
63
64
65
66
server {
listen 80;
server_name host;
root /data/wwwroot/moon_shot;
access_log /data/wwwlogs/host.access.log main;
error_log /data/wwwlogs/host.error.log;
location / {
ssi on;
set $inc $request_uri;
set $doc $document_root;
ssi_silent_errors on;
index index.php index.html index.htm;
}
location /wxapp {
alias /data/wwwroot/moon_shot/public;
index index.html index.php;
if (!-e $request_filename){
rewrite ^/wxapp/(.*)$ /wxapp/index.php/$1 last;
}
}
location ~ /wxapp/.+\.php.*$ {
if ($fastcgi_script_name ~ /wxapp/(.+\.php.*)$) {
set $valid_fastcgi_script_name $1;
}
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /data/wwwroot/moon_shot/public/$valid_fastcgi_script_name;
include fastcgi_params;
client_max_body_size 20m;
}
error_page 500 502 503 504 /error;
location = /error {
rewrite ^/error /wxapp/index.php/error last;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
client_max_body_size 20m;
}
#css,js
location /assets/admin/ {
alias /data/wwwroot/moon_shot/admin/templates/;
}
location /assets/plugin/ {
alias /data/wwwroot/moon_shot/plugins/;
}
location ~\.git {
deny all;
}
location ~\.gitingore {
deny all;
}
}