暗能星系

    • 登录
    • 搜索

    nginx 如何代理VUE history模式路由

    小技巧
    1
    1
    8
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • Z
      zhangfanglin 最后由 编辑

      nginx配置如下:

      server {
         listen       8022;
         server_name  _;
         root /path/path;
         index index.html;
         location / {
           index index.html index.htm;
           try_files $uri $uri/ @fallback;                                                                       
         }
         location @fallback {
           rewrite ^.*$ /index.html break;
         }
       }
      
      1 条回复 最后回复 回复 引用 0
      • First post
        Last post
      Powered by 暗能星系