-
Notifications
You must be signed in to change notification settings - Fork 377
/
Copy pathnginx.conf
59 lines (47 loc) · 1.76 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
54
55
56
57
58
59
user openblocks;
worker_processes __OPENBLOCKS_FRONTEND_WORKERS__;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '"$time_local" client=$remote_addr '
'method=$request_method request="$request" '
'request_length=$request_length '
'status=$status bytes_sent=$bytes_sent '
'body_bytes_sent=$body_bytes_sent '
'referer=$http_referer '
'http_x_forwarded_for=$http_x_forwarded_for '
'user_agent="$http_user_agent" '
'upstream_addr=$upstream_addr '
'upstream_status=$upstream_status '
'request_time=$request_time '
'upstream_response_time=$upstream_response_time '
'upstream_connect_time=$upstream_connect_time '
'upstream_header_time=$upstream_header_time';
keepalive_timeout 65;
sendfile on;
client_max_body_size __OPENBLOCKS_FRONTEND_BODY_SIZE__;
#tcp_nopush on;
server {
listen 3000 default_server;
root /openblocks/client;
location / {
try_files $uri /index.html;
if ($request_filename ~* .*.(html|htm)$) {
add_header Cache-Control no-cache;
}
}
location /api {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass __OPENBLOCKS_API_SERVICE_URL__;
}
location /node-service/plugin-icons {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass __OPENBLOCKS_NODE_SERVICE_URL__;
}
}
}