From: Shane Jaroch Date: Tue, 28 Jun 2022 19:24:24 +0000 (-0400) Subject: try adding base / for reach and /api for sanic X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=fe3fa0cd15574adbc8f0c9b7b2f9c7b5db8fa275;p=nutratech%2Fvps-root.git try adding base / for reach and /api for sanic --- diff --git a/etc/nginx/sites-available/default b/etc/nginx/sites-available/default index 1cc2851..fad1a63 100644 --- a/etc/nginx/sites-available/default +++ b/etc/nginx/sites-available/default @@ -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;