Deploy front-end projects using nginx

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

Guess you like

Origin blog.csdn.net/cleverstronge/article/details/132484781