1. Caddy version (caddy version
):
Caddy2(latest version)
2. How I run Caddy:
in site’dir enter:
caddy2 run
a. System environment:
systemd CentOS
b. Command:
paste command here
c. Service/unit/compose file:
paste full file contents here
d. My complete Caddyfile or JSON config:
paste config here, replacing this text
use `caddy fmt` to make it readable
DO NOT REDACT anything except credentials
or helpers will be sad
3. The problem I’m having:
Mapping URLs to Filesystem Locations , Like “alias” in apache.
Such as:
DocumentRoot www.example.com
when enter www.example.com , jump to site1(/etc/www/var/site1).
when enter www.example.com/site2 , jump to site2(/root/site2).
site1 and site2 have different DoccumentRoot.
I enter a web address
4. Error messages and/or full log output:
Null
5. What I already tried:
caddy config key word : rewrite , but only mapping to DocumentRoot.
double {…} in one configfile , but one caddy only one useful config , I want to two configfiles in different site.
6. Links to relevant resources:
https://httpd.apache.org/docs/2.4/urlmapping.html
THANK FOR TOUR HELP!!!