-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-development.conf
59 lines (52 loc) · 1.86 KB
/
nginx-development.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
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type text/plain;
charset utf-8;
sendfile on;
keepalive_timeout 65;
fastcgi_read_timeout 1800;
gzip on;
gzip_comp_level 2;
gzip_min_length 256;
gzip_proxied any;
gzip_types text/css application/javascript application/json;
error_log stderr info;
server_tokens on;
root /var/www/app/public;
index index.php;
client_max_body_size 1m;
server {
listen 80 default_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
location ~* \.(jpe?g|gif|png|svg|ico|css|js|txt|woff|woff2|map)$ {
log_not_found off;
access_log off;
expires epoch;
}
location ~ /api/v[0-9]+/event/.* {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass canary-aggregator:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/app/public/index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location / {
try_files $uri /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass canary-dashboard:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
}