]> Nutra Git (v2) - nutratech/vps-root.git/commitdiff
update nginx config to match prod
authorShane Jaroch <chown_tee@proton.me>
Sat, 2 Jul 2022 02:42:38 +0000 (22:42 -0400)
committerShane Jaroch <chown_tee@proton.me>
Sat, 2 Jul 2022 02:42:44 +0000 (22:42 -0400)
etc/nginx/sites-available/default

index f7fbb88f4eceade2fb56f165d4e231b6f171c727..cb734734846577c02b9a1fd3bff70c26226b7657 100644 (file)
@@ -9,35 +9,18 @@ server {
   listen 443 ssl http2 default_server;
   listen [::]:443 ssl ipv6only=on; # managed by Certbot
 
+  client_max_body_size 50m;
+
 
   # React app (base URL)
   location / {
     alias /var/www/react_app;
     index index.html;
-    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)
-
+  # Blog / Sphinx
   location ^~ /blog/ {
-    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-    proxy_set_header X-Forwarded-Proto $scheme;
-    proxy_set_header X-Real-IP $remote_addr;
-    proxy_set_header Host $http_host;
-    proxy_pass http://127.0.0.1:2368;
-    proxy_redirect off;
-  }
-
-  location ~ /.well-known {
-    allow all;
-  }
-
-
-  # [NEW] Sphinx blog
-  location /docs {
     alias /var/www/docs/_build/html;
     index index.html;
   }
@@ -64,11 +47,17 @@ server {
   }
 
 
+  # Other
+  location ~ /.well-known {
+    allow all;
+  }
+
+
+  # HTTPS / SSL
   ssl_certificate /etc/letsencrypt/live/deveast.linode.poczatek.dev/fullchain.pem; # managed by Certbot
   ssl_certificate_key /etc/letsencrypt/live/deveast.linode.poczatek.dev/privkey.pem; # managed by Certbot
   include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
   ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
-
 }