From 812678834befaf8794af71b1fdab230818edfdb3 Mon Sep 17 00:00:00 2001 From: nutra-bot Date: Thu, 11 May 2023 20:12:51 +0000 Subject: [PATCH] medusa nginx wip --- etc/nginx/conf.d/default.conf | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/etc/nginx/conf.d/default.conf b/etc/nginx/conf.d/default.conf index 12f5404..114a374 100644 --- a/etc/nginx/conf.d/default.conf +++ b/etc/nginx/conf.d/default.conf @@ -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; -- 2.52.0