I want to enable autoindex only for /abc path is this possible with caddy?
Please fill out the template. What does autoindex
mean?
Autoindex means file listing in caddy
Go through the documentation
Use multiple file_server blocks, with the last one matching everything with browse (the Caddy equivelent of nginx autoindex) turned off
http://localhost:8000 {
root /var/www
file_server /abc/ browse
file_server *
}
not working, my current caddy config file
example.tld www.example.tld {
@www {
host www.example.tld
}
redir @www https://example.tld{uri} permanent
root * /www/example.tld
file_server /abc/ browse
file_server *
php_fastcgi unix//run/php-fpm/www.sock
header Strict-Transport-Security “max-age=31536000; includeSubDomains; preload”
header X-Content-Type-Options “nosniff”
header X-Frame-Options “SAMEORIGIN”
}
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.