index sets the list of file names that are used as "index" files. When a directory path is requested instead of a specific file, the directory is checked for existing index files. The first matching file name is served.
The default index files are, in this order:
Using this directive overwrites the list, it does not append to it.
- filenames... is a list of space-separated filenames to try as indexes. At least one name is required.
Use only goaway.png and easteregg.html as index files:
index goaway.png easteregg.html
Need help with this feature?
Join us in the Caddy forum, where the open source community gathers to share their knowledge.
Does your company use Caddy?
Purchase a commercial license to use Caddy with your business and for basic email support, along with other benefits!