From: nutra-bot Date: Fri, 1 Jul 2022 23:03:27 +0000 (+0000) Subject: use alias not root, wip sphinx /docs/ X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=9484f6abc0572cb9942906d8bb5f2662a2d41b6b;p=nutratech%2Fvps-root.git use alias not root, wip sphinx /docs/ https://stackoverflow.com/questions/41099318/nginx-location-404-not-found --- 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;