From fe3fa0cd15574adbc8f0c9b7b2f9c7b5db8fa275 Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Tue, 28 Jun 2022 15:24:24 -0400 Subject: [PATCH] try adding base / for reach and /api for sanic --- etc/nginx/sites-available/default | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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; -- 2.52.0