track nginx for moms-website
authornutra-bot <nutradigest@gmail.com>
Mon, 5 Jan 2026 13:26:42 +0000 (13:26 +0000)
committernutra-bot <nutradigest@gmail.com>
Mon, 5 Jan 2026 13:26:42 +0000 (13:26 +0000)
etc/nginx/conf.d/default.conf
etc/nginx/conf.d/moms-website.conf [new file with mode: 0644]
etc/nutra.env [deleted file]

index 08c504050829f19706a3ae4ef52eaad11ac6592b..b020d1223cdf83746856592f6dbaee640691d7a3 100644 (file)
@@ -1,28 +1,3 @@
-server {
-  listen 80;
-  server_name 216.218.216.163;
-  root /var/www/moms-website;
-  index index.html;
-  location / {
-    try_files $uri $uri/ /index.html;
-  }
-  location /store {
-    proxy_pass http://localhost:9000;
-    proxy_http_version 1.1;
-    proxy_set_header Upgrade $http_upgrade;
-    proxy_set_header Connection 'upgrade';
-    proxy_set_header Host $host;
-    proxy_cache_bypass $http_upgrade;
-  }
-}
-# Redirect all HTTP to HTTPS with no-WWW
-server {
-  listen 80 default_server;
-  listen [::]:80 default_server;
-  server_name ~^(?:www\.)?(.*)$;
-  return 301 https://$1$request_uri;
-}
-
 # API
 server {
   server_name api-dev.nutra.tk api.dev.nutra.tk;
diff --git a/etc/nginx/conf.d/moms-website.conf b/etc/nginx/conf.d/moms-website.conf
new file mode 100644 (file)
index 0000000..983ef1c
--- /dev/null
@@ -0,0 +1,74 @@
+# Mom's Earthy Bites Kitchen storefront
+server {
+  server_name earthyenergy.mooo.com;
+
+  root /var/www/moms-website;
+  index index.html;
+
+  # Allow certbot verification
+  location /.well-known/acme-challenge/ {
+    root /var/www/html;
+  }
+
+  location / {
+    try_files $uri $uri/ /index.html;
+  }
+
+  location /store {
+    proxy_pass http://localhost:9000;
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection 'upgrade';
+    proxy_set_header Host $host;
+    proxy_set_header X-Real-IP $remote_addr;
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    proxy_set_header X-Forwarded-Proto $scheme;
+    proxy_cache_bypass $http_upgrade;
+  }
+
+  # Proxy to Medusa Auth API (Required for Dashboard login)
+  location /auth {
+    proxy_pass http://localhost:9000;
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection 'upgrade';
+    proxy_set_header Host $host;
+    proxy_set_header X-Real-IP $remote_addr;
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    proxy_set_header X-Forwarded-Proto $scheme;
+    proxy_cache_bypass $http_upgrade;
+  }
+
+  # Proxy to Medusa Admin API (Required for Dashboard login)
+  location /admin {
+    proxy_pass http://localhost:9000;
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection 'upgrade';
+    proxy_set_header Host $host;
+    proxy_set_header X-Real-IP $remote_addr;
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    proxy_set_header X-Forwarded-Proto $scheme;
+    proxy_cache_bypass $http_upgrade;
+  }
+
+    listen 443 ssl; # managed by Certbot
+    ssl_certificate /etc/letsencrypt/live/earthyenergy.mooo.com/fullchain.pem; # managed by Certbot
+    ssl_certificate_key /etc/letsencrypt/live/earthyenergy.mooo.com/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
+
+}
+
+server {
+    if ($host = earthyenergy.mooo.com) {
+        return 301 https://$host$request_uri;
+    } # managed by Certbot
+
+
+  listen 80;
+  server_name earthyenergy.mooo.com;
+    return 404; # managed by Certbot
+
+
+}
\ No newline at end of file
diff --git a/etc/nutra.env b/etc/nutra.env
deleted file mode 100644 (file)
index 8a237c5..0000000
Binary files a/etc/nutra.env and /dev/null differ