fix: update HTTPS server to serve static files instead of proxy
All checks were successful
Deploy Nginx Config to Ubuntu Server / deploy (push) Successful in 1s

- 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
This commit is contained in:
happybell80 2025-07-18 00:03:06 +09:00
parent f45b7951dd
commit dfd47e145d

View File

@ -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