From 9484f6abc0572cb9942906d8bb5f2662a2d41b6b Mon Sep 17 00:00:00 2001 From: nutra-bot Date: Fri, 1 Jul 2022 23:03:27 +0000 Subject: [PATCH] use alias not root, wip sphinx /docs/ https://stackoverflow.com/questions/41099318/nginx-location-404-not-found --- etc/nginx/sites-available/default | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/nginx/sites-available/default b/etc/nginx/sites-available/default index aee0d49..f7fbb88 100644 --- a/etc/nginx/sites-available/default +++ b/etc/nginx/sites-available/default @@ -12,8 +12,8 @@ server { # React app (base URL) location / { - root /var/www/react_app; - index index.html index.htm; + alias /var/www/react_app; + index index.html; try_files $uri $uri/ /index.html =404; } @@ -36,6 +36,13 @@ server { } + # [NEW] Sphinx blog + location /docs { + alias /var/www/docs/_build/html; + index index.html; + } + + # Sanic location /api/ { proxy_pass http://$server_name; -- 2.52.0