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
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:
parent
f45b7951dd
commit
dfd47e145d
@ -113,19 +113,15 @@ 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;
|
||||||
server_name ro-being.com; # managed by Certbot
|
server_name ro-being.com; # managed by Certbot
|
||||||
|
|
||||||
# Main application proxy
|
# Main application static files
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:5173;
|
try_files $uri $uri/ /index.html;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# API endpoints
|
# API endpoints
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user