1. The problem I’m having:
Hi
Sorry if this was already documented or asked somewhere, I’m new to Caddy and maybe I misunderstood some information.
I’m trying to specify only 1 subdirectory in one of my directories to allow access to.
I’m using Modules - Caddy Documentation to mount a bucket as a filesystem. And inside the bucket (which contains lots of folders) I want to show only one specific folder.
I saw there is hide directive, but I don’t want to make an explicit deny list.
Thanks for your help
2. Error messages and/or full log output:
3. Caddy version:
2.10.2
4. How I installed and ran Caddy:
a. System environment:
Ubuntu 24.04
b. Command:
caddy run
c. Service/unit/compose file:
d. My complete Caddy config:
Here is my current minimal configuration:
{
filesystem foo-bucket s3 {
bucket foo-bucket
}
}
http://example.com:1234 {
handle /foo-bucket* {
# TODO: when hit http://example.com:1234/foo-bucket only list the subfolder `foo`
uri strip_prefix /foo-bucket
file_server browse {
fs foo-bucket
}
}
handle {
file_server browse {
root /www
}
}
}
5. Links to relevant resources:
I saw Limit root to specified folders - #4 by francislavoie, but in my understanding, this is different. It allows navigation only to /images or /docs, but other folders are still listed in the webpage ![]()