From dfd47e145dc3a22012eb3cc08bb596f5bd9054c1 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Fri, 18 Jul 2025 00:03:06 +0900 Subject: [PATCH] fix: update HTTPS server to serve static files instead of proxy - Change root from /var/www/html to /home/admin/frontend-customer/dist - Replace proxy_pass with try_files for static file serving - Both HTTP and HTTPS now serve same static content --- server-nginx-default | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/server-nginx-default b/server-nginx-default index 28fe6d3..348e776 100644 --- a/server-nginx-default +++ b/server-nginx-default @@ -113,19 +113,15 @@ server { # # include snippets/snakeoil.conf; - root /var/www/html; + root /home/admin/frontend-customer/dist; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name ro-being.com; # managed by Certbot - # Main application proxy + # Main application static files location / { - proxy_pass http://localhost:5173; - 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; + try_files $uri $uri/ /index.html; } # API endpoints