Open the nginx configuration file and enter the following code
server {
listen 80;
server_name your-domain.com;
location / {
root /your-project-path/dist; // 项目实际路径
index index.html;
try_files $uri $uri/ /index.html;
}
}
Just restart nginx after modification