Vue Router with Nginx Proxy Manager resulting in 404 not found error #3301
Replies: 2 comments 4 replies
-
I think you may be misinterpreting the functionality of this project. Your You say
this seems to imply that your app and NPM are in the same docker container somehow, which is not how this is going to work. You should bring up your app in another container on the same or another host and proxy to it. |
Beta Was this translation helpful? Give feedback.
-
@Luispinto26 did you ever find a solution? |
Beta Was this translation helpful? Give feedback.
-
I have a Vue.js 3 application with Vue Router 4 for client-side routing. The application is running in a docker container on AWS EC2 instance, and using Nginx Proxy Manager for reverse proxy management in a Docker container too.
When trying to access the URL https://www.myurl.pt/cancel-appointment, the server returns a 404 not found error. The expected behavior is for the Nginx server to properly route the request to my Vue app's index.html so that Vue Router can handle the route.
The Nginx Proxy Manager container is set up to handle proxy hosts with the correct reverse proxy configurations. I have updated the location / block in my proxy host config file to include the 'try_files' directive:
However, the issue persists.
I have followed recommended steps to troubleshoot the issue, including:
My Vue Router is configured using history mode and works as expected in my local development environment. I only experience this issue when accessing the live site hosted on AWS.
This is my stack of containers running on my server:
[Docker containers Setup][1]
Vue Router Config:
My vue app DOCKERFILE:
I'm seeking help in mitigating this 404 not found error issue and ensuring that my Vue Router works correctly with Nginx Proxy Manager.
Beta Was this translation helpful? Give feedback.
All reactions