From: nutra-bot Date: Mon, 5 Jan 2026 13:26:42 +0000 (+0000) Subject: track nginx for moms-website X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=fc846225f525ed63ddcc23a8a57a3e3029898584;p=nutratech%2Fvps-root.git track nginx for moms-website --- diff --git a/etc/nginx/conf.d/default.conf b/etc/nginx/conf.d/default.conf index 08c5040..b020d12 100644 --- a/etc/nginx/conf.d/default.conf +++ b/etc/nginx/conf.d/default.conf @@ -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 index 0000000..983ef1c --- /dev/null +++ b/etc/nginx/conf.d/moms-website.conf @@ -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 index 8a237c5..0000000 Binary files a/etc/nutra.env and /dev/null differ