forked from lav45/yii2-translated-behavior-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
34 lines (32 loc) · 910 Bytes
/
nginx.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
charset utf-8;
client_max_body_size 128M;
access_log off;
index index.php;
location ~ ^/admin/(.+\.(js|css|png|jpe?g|gif|swf|ico|pdf|mov|fla|zip|rar|woff2|woff|ttf|map))$ {
expires max;
rewrite ^/admin/(.+)$ /backend/web/$1 break;
try_files $uri =404;
}
location ~ \.(js|css|png|jpe?g|gif|swf|ico|pdf|mov|fla|zip|rar|woff2|woff|ttf|map)$ {
expires max;
rewrite ^/(.+)$ /frontend/web/$1 break;
try_files $uri =404;
}
location /admin {
rewrite ^ /backend/web/index.php last;
}
location / {
rewrite ^ /frontend/web/index.php last;
}
location ~ web/index\.php$ {
internal;
include fastcgi_params;
fastcgi_pass heroku-fcgi;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info if_not_empty;
}
location ~ \.php$ {
return 404;
}