Untitled
unknown
plain_text
2 years ago
2.2 kB
8
Indexable
# https://caddy.community/t/dynamically-redirect-www-to-non-www-vice-versa/9126/3
(strip-www) {
@www.{args.0} host www.{args.0}
redir @www.{args.0} https://{args.0}{uri}
}
:80 {
@cachedFiles {
path *.jpg *.jpeg *.png *.gif *.ico *.svg *.webp *.mp4
}
root * /var/www/frunkyea/current/public
# root * /var/www/fleetwire.io/releases/20201121003943/public
# root * /var/www/html
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 sub2
X-Self-Sub true
Server FY
}
header /images {
Cache-Control "public, max-age=31536000"
}
header @cachedFiles Cache-Control "public, max-age=31536002"
log {
output file /var/log/caddy/access-80.log
format json
}
encode gzip
php_fastcgi unix//run/php/php-fpm.sock {
resolve_root_symlink
}
file_server
}
:443 {
@cachedFiles {
path *.jpg *.jpeg *.png *.gif *.ico *.svg *.webp *.mp4
}
import strip-www frunkyea.com
root * /var/www/frunkyea/current/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 sub2
X-Self-Sub true
Server FY
}
header @cachedFiles Cache-Control "public, max-age=31536002"
header /images {
Cache-Control "public, max-age=31536000"
}
log {
output file /var/log/caddy/access-443.log
format json
}
tls {
on_demand
}
encode gzip
# unix//run/php/php7.4-fpm.sock
php_fastcgi unix//run/php/php8.1-fpm.sock {
resolve_root_symlink
}
file_server
}
Editor is loading...