1. Caddy version (caddy version
):
2.4.2
2. How I run Caddy:
Installed via PPA and it runs automatically via systemd or manually from caddy start
a. System environment:
Ubuntu 20.04
b. Command:
caddy start
#### c. Service/unit/compose file:
<!-- If using Docker/systemd/Kubernetes/make etc. -->
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
#### d. My complete Caddyfile or JSON config:
https://thedeveloper.club {
tls emai@gmail.com
encode zstd gzip
root * /var/www/
@cachedFiles {
path *.jpg *.jpeg *.png *.gif *.ico *.js *.css *.html *.svg *.ttf *.webp *.woff2 *.woff
}
try_files {path} {path}/index.php
file_server
header @cachedFiles Cache-Control “public, max-age=604800, must-revalidate”
php_fastcgi localhost:9000
}
### 3. The problem I'm having:
<!-- What are you trying to do, and what isn't working? Please describe the issue thoroughly enough so that anyone can reproduce the exact behavior you're seeing. Be as specific as possible. DO NOT USE WEB BROWSERS; use "curl -v" instead. -->
Lets say I want to show example.com/subfolder but without it saying index.php and telling caddy to assume there will always be an index.php file there. So
example.com/subfolder/index.php would turn to
example.com/subfolder
And index.php would not show in the url
Along with this. In the case index.php is not found, fallback to another specific file or files. Is this possible?
### 4. Error messages and/or full log output:
<!-- Please **DO NOT REDACT** any information except credentials. Leave domain names intact! -->
<!-- Please **DO NOT POST TRUNCATED LOG LINES** as systemd is notorious for this. -->
<!-- Please **DO NOT USE WEB BROWSERS.** Use curl -v instead. -->
<!-- Please **DO ENABLE DEBUG MODE FIRST** by adding "debug" to the global options of your Caddyfile. -->
### 5. What I already tried:
<!-- Show us what effort you've put in to solving the problem. Be specific -- people are volunteering their time to help you! Low effort posts are not likely to get good answers! -->
### 6. Links to relevant resources: