localdev nginx.conf fix

This commit is contained in:
2022-09-07 12:52:37 +03:00
parent 82c501f1b5
commit 742042398c

View File

@@ -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/*;
}
# include /usr/local/etc/nginx/servers/*;
}