forked from ropensci/fishbaseapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
49 lines (34 loc) · 909 Bytes
/
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
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
keepalive_timeout 0;
gzip on;
upstream app {
server api:8888 fail_timeout=0;
}
server {
listen 80;
server_name fishbase.ropensci.org;
try_files $uri/index.html $uri @app;
root /opt/sinatra/tmp;
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://app;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 0;
keepalive_timeout 0;
}
}