-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx.conf
53 lines (42 loc) · 1.21 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
server {
server_name {mysite}.example.com;
location / {
include proxy_params;
proxy_pass http://127.0.0.1:3000;
}
location ~ ^/(api|docs|storage|media|files|admin|ckeditor|elfinder|packages|build|brand|_ignition) {
include proxy_params;
proxy_pass http://127.0.0.1:8000;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|eot|svg|ttf|woff|woff2)$ {
expires max;
access_log off;
log_not_found off;
proxy_pass http://127.0.0.1:3000;
}
}
server {
listen 8000;
server_name {mysite}.example.com;
root /var/www/{mysite}/public;
index index.php;
access_log /var/log/nginx/{mysite}.access.log;
error_log /var/log/nginx/{mysite}.error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ ^/docs/ {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ ^/media/cache/ {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|eot|svg|ttf|woff|woff2)$ {
expires max;
access_log off;
log_not_found off;
}
}