vue-element-admin icon indicating copy to clipboard operation
vue-element-admin copied to clipboard

How to deploy with Caddy 2 server

Open ndphuong opened this issue 3 years ago • 1 comments

Hi,

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

ndphuong avatar Jul 22 '20 17:07 ndphuong

the same question for me

gonboy avatar Apr 10 '22 13:04 gonboy

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/

sg552 avatar Oct 10 '22 02:10 sg552