Browse Source

Fixed production nginx config

Owen Diffey 3 years ago
parent
commit
5a1a4cf7fd
1 changed files with 11 additions and 11 deletions
  1. 11 11
      frontend/prod.nginx.conf

+ 11 - 11
frontend/prod.nginx.conf

@@ -21,19 +21,19 @@ http {
         location / {
             try_files $uri /build/$uri /build/index.html =404;
         }
-    }
 
-    location /backend {
-        proxy_set_header X-Real-IP  $remote_addr;
-        proxy_set_header X-Forwarded-For $remote_addr;
-        proxy_set_header Host $host;
+        location /backend {
+            proxy_set_header X-Real-IP  $remote_addr;
+            proxy_set_header X-Forwarded-For $remote_addr;
+            proxy_set_header Host $host;
 
-        proxy_http_version 1.1;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection "upgrade";
-        proxy_redirect off;
+            proxy_http_version 1.1;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection "upgrade";
+            proxy_redirect off;
 
-        rewrite ^/backend/?(.*) /$1 break;
-        proxy_pass http://backend:8080; 
+            rewrite ^/backend/?(.*) /$1 break;
+            proxy_pass http://backend:8080; 
+        }
     }
 }