Vue-router on apache, SPA in sub-directory, can only access pages by redirect

前端 未结 3 546
陌清茗
陌清茗 2021-02-04 17:58

So I have a Vue app for a client set up on an apache dev server. I am doing this to match the production environment. The app is in a subdirectory and I set the \'base\' option

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 18:42

    i fixed this by adding FallbackResource /index.html in my site configuration...

    the directory in /etc/apache2/sites-enabled/{your domain}.conf

    DocumentRoot /var/www/yourApp/dist
    
        FallbackResource /index.html
    
    

提交回复
热议问题