From 83d6f1a13cc521a03d0ce5865c5a04c88f659292 Mon Sep 17 00:00:00 2001 From: DCsunset Date: Fri, 17 Jul 2020 00:34:47 -0700 Subject: [PATCH] feat(nginx): add config for nginx --- nginx/nginx.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 nginx/nginx.conf diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..96d97ca --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,17 @@ +server { + listen 80; + listen [::]:80; + + # Frontend + location / { + root /static/; + } + + # Backend + location /api/ { + # Slash at the end is necessary to rewrite the path + proxy_pass http://localhost:3000/; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $remote_addr; + } +}