-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathnginx
53 lines (45 loc) · 782 Bytes
/
nginx
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
server {
location /temp/ {
location ~ .*\.(php)?$
{
deny all;
}
}
if ($request_uri ~* index/?$)
{
rewrite ^/(.*)/index/?$ /$1 permanent;
}
if ($request_uri ~* ^/application)
{
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
if ($request_uri ~* ^/vendor)
{
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
if ($request_uri ~* ^/data)
{
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
if ($request_uri ~* ^/resource)
{
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
location ~ /\. {
deny all;
}
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_read_timeout 300;
}
}