- Update the caddyfile into
/etc/caddy/Caddyfile
example.com {
root * /var/www/html/public
encode gzip
reverse_proxy /socket/* http://0.0.0.0:8080
php_fastcgi unix//run/php/php8.3-fpm.sock
file_server
header / {
-Server
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
}
@notFound {
file {
try_files {path} {path}/ /index.php
}
}
rewrite @notFound /index.php
}