Nginx部署SPA单页应用(Vue,React)刷新页面报404问题修复


配置Nginx


server {
    listen 80;
    server_name your_domain.com;

    root /path/to/your/app;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }
}

评论已关闭