fix: change nginx root to serve frontend-customer static files
Some checks failed
Deploy Nginx Config to Ubuntu Server / deploy (push) Failing after 1s

- Change root from /var/www/html to /home/admin/frontend-customer/dist
- Add try_files for SPA routing support
This commit is contained in:
happybell80 2025-07-17 23:53:44 +09:00
parent 00ce33ec37
commit 9395a46d4c

View File

@ -38,7 +38,7 @@ server {
# #
# include snippets/snakeoil.conf; # 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 # Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html; index index.html index.htm index.nginx-debian.html;
@ -48,6 +48,7 @@ server {
location / { location / {
# First attempt to serve request as file, then # First attempt to serve request as file, then
# as directory, then fall back to displaying a 404. # as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
} }