From 742042398c015f45b2f737beaac90cc52094d9ad Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Wed, 7 Sep 2022 12:52:37 +0300 Subject: [PATCH] localdev nginx.conf fix --- nginx.conf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nginx.conf b/nginx.conf index 635a17de..b1732506 100644 --- a/nginx.conf +++ b/nginx.conf @@ -14,7 +14,7 @@ events { } http { - include mime.types; + include /usr/local/etc/nginx/mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' @@ -35,11 +35,11 @@ http { ~^https?://(.*\.)?localhost:3000|new.discours.io|discours.io()(:\d+)?$ $http_origin; default ""; } - - upstream discoursio-api-8080 { + + upstream localhost-8080 { server 0.0.0.0:8080; } - + server { listen localhost:8000; #server_name localhost; @@ -59,8 +59,8 @@ http { gzip_vary on; gzip_comp_level 6; - proxy_pass http://discoursio-api-8080; - http2_push_preload on; + proxy_pass http://localhost-8080; + http2_push_preload on; proxy_http_version 1.1; proxy_read_timeout 60s; proxy_buffer_size 4096; @@ -74,7 +74,7 @@ http { proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Request-Start $msec; - + if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*' always; @@ -176,5 +176,5 @@ http { # index index.html index.htm; # } #} - include servers/*; -} \ No newline at end of file + # include /usr/local/etc/nginx/servers/*; +}