]> Nutra Git (v2) - nutratech/vps-root.git/commitdiff
medusa nginx wip
authornutra-bot <nutradigest@gmail.com>
Thu, 11 May 2023 20:12:51 +0000 (20:12 +0000)
committernutra-bot <nutradigest@gmail.com>
Thu, 11 May 2023 20:12:51 +0000 (20:12 +0000)
etc/nginx/conf.d/default.conf

index 12f5404392f31baf55704265b5d622fdd9200c23..114a3747894ea25820b94bb1de218f6b157d04c7 100644 (file)
@@ -29,11 +29,31 @@ server {
   }
 
   # default favicon
-  location /favicon.ico {
+  location /favicon.ico {
     alias /var/www/favicon.gif;
   }
 }
 
+# Store Front (MedusaJS)
+server {
+  server_name store.nutra.tk;
+  #listen 80;
+  listen 443 ssl http2;
+  location / {
+    proxy_pass http://localhost:8000;
+  }
+}
+
+# Store [Admin UI] (MedusaJS)
+server {
+  server_name store-api.nutra.tk store-admin-8b56411b.nutra.tk;
+  #listen 80;
+  listen 443 ssl http2;
+  location / {
+    proxy_pass http://localhost:9000;
+  }
+}
+
 # UI, blog, favicon, default server
 server {
   server_name dev.nutra.tk;
@@ -41,6 +61,9 @@ server {
   #listen [::]:80 ipv6only=on;
   listen 443 ssl http2 default_server;
   listen [::]:443 ssl ipv6only=on; # managed by Certbot
+
+  client_max_body_size 50m;
+
   # HSTS
   add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
   # OCSP stapling
@@ -48,8 +71,6 @@ server {
   ssl_stapling_verify on;
   ssl_trusted_certificate /etc/ssl/private/ca-certs.pem;
 
-  client_max_body_size 50m;
-
   # React app (base URL)
   location / {
     #return 302 https://$host/api$request_uri;