I\'m trying to setup a vue-router on my nginx server. The issue I\'m having is that my route doesn\'t work if I enter url directly to the browser myapp.com/mypath
I struggled for several hours solving the same problem. After all this config works for me:
events {
...
http {
...
server {
listen 80;
server_name localhost;
location / {
root /path/to/your/project/html;
index index.html index.htm;
include /etc/nginx/mime.types;
try_files $uri $uri/ /index.html;
}
}
}
}
I have almost the same router setup as you.