Nginx 二级目录访问 与 前端 History 问题配置


        # 这个路径写法很重要  访问地址 : https://domain/admin   访问系统的文件目录:  /project/admin
        location /admin {
            root /project;
            index  index.html index.htm;
            # 解决前端 history模式刷新页面时页面丢失
            try_files $uri $uri/ /index.html;
        }

你可能感兴趣的:(nginx)