-
Describe the bugI have a domain with the following structure:
Here is the configuration I have in my vite.config.js:
And here is my Nginx configuration:
The app generally works, but I am facing some issues:
What’s the best way to configure Nginx and Vite so that:
Any help or guidance is appreciated! ReproductionSteps to reproduceNo response System InfoUbuntu 24.04.1 LTS Used Package Managernpm LogsNo response Validations
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The issue was related to my Nginx configuration. Since I was using alias to serve the Vite React build, Nginx was loading the default index.html. To resolve this, I explicitly specified /app/index.html in the configuration. Here's the updated location block:
This ensures the correct fallback behavior for routes under /app. |
Beta Was this translation helpful? Give feedback.
The issue was related to my Nginx configuration. Since I was using alias to serve the Vite React build, Nginx was loading the default index.html. To resolve this, I explicitly specified /app/index.html in the configuration. Here's the updated location block:
This ensures the correct fallback behavior for routes under /app.