reactjs – Nginx Not Serving Correct File by Default & React Front-End Not Syncing with Supabase

’m running a VPS with Ubuntu and have manually installed Nginx from source. My server block for admin.bellengale.com currently looks like this:

server {
    server_name admin.bellengale.com;
    root /var/www/admin.bellengale.com;
    location / {
        try_files $uri $uri/ /index.html;
    }
}

In /var/www/admin.bellengale.com/ I have both admin.html and index.html. When visiting admin.bellengale.com, I want users to see admin.html by default, but Nginx keeps serving index.html.
How can I adjust my configuration so admin.html is served as the default for this subdomain?

Additionally, my React front-end (served by Nginx) isn’t displaying dynamic content from Supabase as expected—some text is missing or not updating.
What are the best practices for debugging React/Supabase connectivity issues behind Nginx? Are there common Nginx or CORS settings that could cause this?

Any guidance on both the Nginx configuration and troubleshooting the React/Supabase sync would be greatly appreciated!

Read more here: Source link