]> Nutra Git (v2) - nutratech/vps-root.git/commitdiff
use alias not root, wip sphinx /docs/
authornutra-bot <nutradigest@gmail.com>
Fri, 1 Jul 2022 23:03:27 +0000 (23:03 +0000)
committernutra-bot <nutradigest@gmail.com>
Fri, 1 Jul 2022 23:03:27 +0000 (23:03 +0000)
    https://stackoverflow.com/questions/41099318/nginx-location-404-not-found

etc/nginx/sites-available/default

index aee0d498ec11531bcf8f9418f87804fdf40a0545..f7fbb88f4eceade2fb56f165d4e231b6f171c727 100644 (file)
@@ -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;