File size: 1,057 Bytes
755e336
 
8202fe8
fb89bb4
 
755e336
 
 
8202fe8
755e336
 
 
 
 
 
 
1f73ad7
 
 
 
 
 
 
bcdad46
96c2b70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bcdad46
8202fe8
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
user root;
worker_processes  1;

pid /run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;
    error_log   /var/log/nginx/error.log;

    server {
        listen              8080 default_server;
        server_name         guardai.io www.guardai.io;

        root /usr/share/nginx/html;
        client_max_body_size 100M;
        proxy_read_timeout 600;
        proxy_connect_timeout 600;
        proxy_send_timeout 600;
        send_timeout 600;

        # proxy api requests to flask server
        location /api/ {
            proxy_pass http://127.0.0.1:5000/;
        }

        location / {
            try_files $uri /index.html;
        }
    }
}