From 7bbff7ddf529c7e88fcce5c03f95e822a3e841c1 Mon Sep 17 00:00:00 2001 From: cs141135 Date: Sun, 13 Jun 2021 14:16:10 +0000 Subject: [PATCH] Upload files to 'flaskapp/nginx/conf.d' --- flaskapp/nginx/conf.d/app.conf | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 flaskapp/nginx/conf.d/app.conf diff --git a/flaskapp/nginx/conf.d/app.conf b/flaskapp/nginx/conf.d/app.conf new file mode 100644 index 0000000..652dceb --- /dev/null +++ b/flaskapp/nginx/conf.d/app.conf @@ -0,0 +1,26 @@ +upstream app_server { + server flask:5000; +} + +server { + listen 80; + server_name _; + error_log /var/log/nginx/error.log; + access_log /var/log/nginx/access.log; + client_max_body_size 64M; + + location / { + try_files $uri @proxy_to_app; + } + + location @proxy_to_app { + gzip_static on; + + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $http_host; + proxy_buffering off; + proxy_redirect off; + proxy_pass http://app_server; + } +} \ No newline at end of file