1. Caddy version (caddy version
): v2.2.0
2. How I run Caddy:
caddy start
a. System environment:
Linux 4.15.0-106-generic x86_64
b. Command:
caddy reload
d. My complete Caddyfile or JSON config:
{
on_demand_tls {
ask https://fleetwire.io/custom-domain-check
}
}
https://fleetwire.io {
@cachedFiles {
path *.jpg *.jpeg *.png *.gif *.ico *.svg *.webp
}
# root * /var/www/fleetwire.io/current/public
root * /var/www/fleetwire.io/releases/20201120233219/public
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, OPTIONS"
Strict-Transport-Security max-age=31536000
Referrer-Policy "no-referrer, strict-origin-when-cross-origin, no-referrer-when-downgrade"
X-Content-Type-Options nosniff
Access-Control-Allow-Headers "Origin, Access-Control-Allow-Headers, Access-Control-Allow-Origin, Accept, Content-Type, X-Auth-Token, X-Requested-With"
CustomDomainHost {host}
FWServe main
X-Real-IP {remote}
X-Forwarded-For {remote}
X-Self-Sub false
Server Avoca
}
header @cachedFiles Cache-Control "public, max-age=31536002"
log {
output file /var/log/caddy/access2.log
format console
level error
}
tls {
on_demand
}
encode gzip
php_fastcgi unix//run/php/php-fpm.sock
file_server
}
3. The problem I’m having:
I’m using Envoyer to deploy my laravel app. (Introduction | Envoyer)
Envoyer creates and release folder and after done building will create a new symlink at this folder “var/www/fleetwire.io/current/public”.
I reload caddy caddy reload
and shows success. My problem has been after the symlink is swapped out caddy doesn’t seem to actually reload.
I have been using the non symlink folder path of the release as you can see in my caddyfile above. I know that caddy isn’t reload bc after i run a build locally I have several new js/css files after webpack runs and after a reload my app breaks bc it is looking for the old css/js. (ex. before push the app.js version as app.asd205449.js
and the new app.js version is app.hpflrkt9.js
.