]> Nutra Git (v1) - nutratech/vps-root.git/commitdiff
try adding base / for reach and /api for sanic
authorShane Jaroch <chown_tee@proton.me>
Tue, 28 Jun 2022 19:24:24 +0000 (15:24 -0400)
committerShane Jaroch <chown_tee@proton.me>
Tue, 28 Jun 2022 19:24:24 +0000 (15:24 -0400)
etc/nginx/sites-available/default

index 1cc285128a9b6d8a3d768b65de8aeaa095d74bab..fad1a6373a3bd641d54660ffdaf65fc645c9ba71 100644 (file)
@@ -10,14 +10,16 @@ server {
   listen [::]:443 ssl http2 default_server;
 
 
-  # TODO: do we want to do this?
-  # Serve static files if found, otherwise proxy to Sanic
+  # React app (base URL)
   location / {
-    root /var/www;
-    try_files $uri @sanic;
+    root   /usr/share/nginx/html;
+    index  index.html index.htm;
+    try_files $uri $uri/ /index.html =404;
   }
 
+
   # Ghost
+  client_max_body_size 50m;
   root /var/www/blog/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
 
   location ^~ /blog/ {
@@ -33,11 +35,9 @@ server {
     allow all;
   }
 
-  client_max_body_size 50m;
-
 
   # Sanic
-  location @sanic {
+  location /api/ {
     proxy_pass http://$server_name;
     # Allow fast streaming HTTP/1.1 pipes (keep-alive, unbuffered)
     proxy_http_version 1.1;