vue-element-admin How to deploy with Caddy 2 server

bq3bfh9z  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(54)

Hi,

I want to deploy this SPA using Caddy2 server but cannot find any working Caddyfile example

sd2nnvve

sd2nnvve1#

the same question for me

jtoj6r0c

jtoj6r0c2#

assuming you are using vue3 history mode and Caddy2 , try this:

yoursite.com {
  encode zstd gzip
  root * /opt/app/vue3_lesson_demo/dist     # here is your vue build folder  
  file_server
}

refer to: http://siwei.me/blog/posts/linux-caddy-vue3-caddy2

demo: https://vue.test-pns-link.com/

相关问题