Hi, I’m trying to set multiple roots to be handling multiple paths, but the /about
handler does not work. it gives a localhost page not found.
My Caddyfile below
:2016 {
handle /about {
root * /path/1
}
handle {
root * /path/2
}
log {
output stdout
}
file_server
}
This is my error log
ERROR http.log.access.log0 handled request {"request": {"method": "GET", "uri": "/about", "proto": "HTTP/1.1", "remote_addr": "[::1]:41572", "host": "localhost:2016", "headers": {"Sec-Fetch-Site": ["none"], "Sec-Fetch-Mode": ["navigate"], "Sec-Fetch-User": ["?1"], "Sec-Fetch-Dest": ["document"], "Connection": ["keep-alive"], "Upgrade-Insecure-Requests": ["1"], "User-Agent": ["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36"], "Accept-Language": ["en-US,en;q=0.9"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"], "Accept-Encoding": ["gzip, deflate, br"]}}, "common_log": "::1 - - [01/Jul/2020:08:34:19 +0800] \"GET /about HTTP/1.1\" 404 0", "duration": 0.00006654, "size": 0, "status": 404, "resp_headers": {"Server": ["Caddy"]}}
Thanks for the help