-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerize Vue.js App | Example docker file with Nginx causes 404 issues #2818
Comments
I ran into this as well. The example seems to be missing some nginx config to try index.html https://stackoverflow.com/questions/47655869/how-to-use-vue-js-with-nginx |
+1 for @chrisvdp's comment, adding I added nginx folder with a default.conf file to my project and copying it to my container using Dockerfile. Here is my Dockerfile (I'm using Vue3 Vitesse template btw, so Dockerfile uses pnpm to build the project)
|
@maximkrouk Thank you!!!! Your conf and dockerfile fixed it for me. |
The Example provided in the page "Dockerize Vue.js App" with Nginx, causes 404 issues for the deployed app. I think we need to add a custom nginx conf file.
link: https://vuejs.org/v2/cookbook/dockerize-vuejs-app.html#Real-World-Example
The Nginx 404 is displayed only when directly accessing a route other than '/'
So its displayed only when directly accessing the
example.com/articles
from the browser URL but works fine when going toexample.com
The text was updated successfully, but these errors were encountered: