Peiyan commited on
Commit
c216203
·
verified ·
1 Parent(s): 2b02f32

Update deployment/docker/nginx.conf

Browse files
Files changed (1) hide show
  1. deployment/docker/nginx.conf +26 -18
deployment/docker/nginx.conf CHANGED
@@ -22,23 +22,31 @@ http {
22
  error_log /var/log/nginx/error.log;
23
 
24
  server {
25
- listen 8080 default_server;
26
- server_name guardai.io www.guardai.io;
27
-
28
- root /usr/share/nginx/html;
29
- client_max_body_size 100M;
30
- proxy_read_timeout 600;
31
- proxy_connect_timeout 600;
32
- proxy_send_timeout 600;
33
- send_timeout 600;
34
-
35
- # proxy api requests to flask server
36
- location /api/ {
37
- proxy_pass http://127.0.0.1:5000/;
38
- }
39
-
40
- location / {
41
- try_files $uri /index.html;
42
- }
 
 
 
43
  }
 
 
 
 
 
44
  }
 
22
  error_log /var/log/nginx/error.log;
23
 
24
  server {
25
+ listen 80 default_server;
26
+ server_name guardai.io www.guardai.io;
27
+
28
+ root /var/www/html;
29
+ client_max_body_size 100M;
30
+ proxy_read_timeout 600;
31
+ proxy_connect_timeout 600;
32
+ proxy_send_timeout 600;
33
+ send_timeout 600;
34
+
35
+ # Set custom log file paths
36
+ error_log /var/log/nginx/error.log;
37
+ access_log /var/log/nginx/access.log;
38
+
39
+ # proxy api requests to flask server
40
+ location /api/ {
41
+ proxy_pass http://127.0.0.1:5000/;
42
+ proxy_set_header Host $host;
43
+ proxy_set_header X-Real-IP $remote_addr;
44
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
45
+ proxy_set_header X-Forwarded-Proto $scheme;
46
  }
47
+
48
+ location / {
49
+ try_files $uri /index.html;
50
+ }
51
+ }
52
  }