nginx.conf
1.33 KB
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
server {
listen 80;
server_name vents.dev www.vents.dev;
root /var/www/domains/vents.dev/web;
access_log /var/log/nginx/vents.dev.access.log combined;
error_log /var/log/nginx/vents.dev.error.log warn;
charset utf-8;
client_max_body_size 100M;
location / {
root /var/www/domains/vents.dev/web;
try_files $uri /index.php?$args;
}
location ~* \.php$ {
try_files $uri /$uri =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(css|js|jpg|jpeg|png|gif|bmp|ico|mov|swf|pdf|zip|rar)$ {
access_log off;
log_not_found off;
try_files $uri /$uri =404;
}
location ~* \.(htaccess|htpasswd|svn|git) {
deny all;
}
location /backend {
root /var/www/domains/vents.dev/web;
try_files $uri /backend/index.php?$args;
}
location ~ ^/backend/(.+\.php) {
try_files $uri /$uri =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
try_files /does_not_exists @php;