-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx_vhost
More file actions
31 lines (28 loc) · 827 Bytes
/
nginx_vhost
File metadata and controls
31 lines (28 loc) · 827 Bytes
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
server {
listen *:80;
server_name example.com;
location ~ ^/api.+ {
root /var/www/blog/api/web;
index app.php;
rewrite ^(.+)$ /app.php/$1 last;
}
location ~ ^/app\.php($|/) {
root /var/www/blog/api/web;
index app.php;
fastcgi_buffer_size 512k;
fastcgi_buffers 16 512k;
fastcgi_busy_buffers_size 512k;
fastcgi_index app.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
}
location / {
root /var/www/blog/dist;
try_files $uri $uri/ /index.html =404 ;
index index.html;
}
}