-
Notifications
You must be signed in to change notification settings - Fork 4
/
yii2nginx.conf
60 lines (44 loc) · 1.45 KB
/
yii2nginx.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
server {
charset utf-8;
client_max_body_size 128M;
listen 80;
server_name frontend.dev;
root /app/frontend/web/;
index index.php index.html index.htm;
access_log /var/log/frontend-access.log;
error_log /var/log/frontend-error.log;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include /etc/nginx/fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
server {
charset utf-8;
client_max_body_size 128M;
listen 80;
server_name backend.dev;
root /app/backend/web/;
index index.php index.html index.htm;
access_log /var/log/backend-access.log;
error_log /var/log/backend-error.log;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include /etc/nginx/fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}