Hi guys I seem to misunderstand something about how to configure caddy (new to it previously apache/nginx only) despite googling a lot. How to properly set up different file server root dirs for different subpaths of same domain? Thanks a lot
1. My Caddy version (caddy version
):
v2.0.0-rc.3 h1:z2H/QnaRscip6aZJxwTbghu3zhC88Vo8l/K57WUce4Q=
2. How I run Caddy:
As a service (systemctl enable caddy)
a. System environment:
systemd, raspbian (from the package as per caddy website instructions)
b. Command:
c. Service/unit/compose file:
d. My complete Caddyfile or JSON config:
domain.com www.domain.com {
root /staging/* /path/to/staging
root * /path/to/production
file_server
}
3. The problem I’m having:
domain.com/staging -> 404
domain.com/staging/ -> 404
domain.com/staging/index.html ->404
the domain.com/everthingelse
works as expected.
The file /path/to/staging/index.html
exists and is readable by webserver (permissions).
4. Error messages and/or full log output:
5. What I already tried:
google, google, google