1. Caddy version (caddy version
):
v2.0.0
2. How I run Caddy:
a. System environment:
Windows 10 1909, Command Prompt
b. Command:
caddy run -adapter caddyfile -config Caddyfile
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
brothermingstream.zapto.org {
route {
route /hls/* {
uri strip_prefix /hls
file_server {
root Z:/home/emun/hls/ingress/
}
}
reverse_proxy /* https://localhost:5050 {
header_down Access-Control-Allow-Origin "*"
transport http {
tls_insecure_skip_verify
}
}
}
log {
output stdout
}
}
3. The problem I’m having:
I am trying to do a GET request to /hls/key_720.m3u8
. Caddy gives a 404 error. I believe that my Caddyfile may have something wrong with it? I had it briefly working (successfully retrieve /hls/key_720.m3u8
) while I was working with localhost. Once I used a DDNS to make my web server publicly available and changed my Caddyfile accordingly, the request started to return 404.
My file_server root is Z:/home/emun/hls/ingress/
. I have a Z drive that is network-shared to my WSL Ubuntu18.04 directory. In File Explorer, going to the Z:\home\emun\hls\ingress\
folder, there is a file called key_720.m3u8
.
4. Error messages and/or full log output:
Browser console error:
VM102:1 GET https://brothermingstream.zapto.org/hls/key_720.m3u8 404
Caddy log:
2020/05/29 08:04:58.024 e[34mINFOe[0m using provided configuration {"config_file": "Caddyfile", "config_adapter": "caddyfile"}
2020/05/29 08:04:58.044 e[34mINFOe[0m admin admin endpoint started {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["127.0.0.1:2019", "localhost:2019", "[::1]:2019"]}
2020/05/29 08:04:58.048 e[34mINFOe[0m http server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}
2020/05/29 08:04:58.048 e[34mINFOe[0m http enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}
2020/05/29 04:04:58 [INFO][cache:0xc00078c0a0] Started certificate maintenance routine
2020/05/29 08:04:58.060 e[34mINFOe[0m tls cleaned up storage units
2020/05/29 08:04:58.065 e[34mINFOe[0m http enabling automatic TLS certificate management {"domains": ["brothermingstream.zapto.org"]}
2020/05/29 08:04:58.092 e[34mINFOe[0m autosaved config {"file": "C:\\Users\\Eric Mun\\AppData\\Roaming\\Caddy\\autosave.json"}
2020/05/29 08:04:58.092 e[34mINFOe[0m serving initial configuration
2020/05/29 08:04:59.073 e[31mERRORe[0m http.log.access.log0 handled request {"request": {"method": "GET", "uri": "/hls/key_720.m3u8", "proto": "HTTP/2.0", "remote_addr": "192.168.1.166:56756", "host": "brothermingstream.zapto.org", "headers": {"User-Agent": ["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36"], "Sec-Fetch-Site": ["same-origin"], "Sec-Fetch-Dest": ["empty"], "Referer": ["https://brothermingstream.zapto.org/"], "Accept-Encoding": ["gzip, deflate, br"], "Accept-Language": ["en-US,en;q=0.9"], "Cookie": [".AspNetCore.Antiforgery.WgyjVqvh01M=CfDJ8IJc2rAnMqpJumCXhgt0MUk4Nf-cPSuq2t29OJP46yPP1hZtKfTM6HcXkbqvpMQCV1IP_eqWIQiIPZxILYYeUqa3X6DyFMH1xbLLOj6YNZOyu7ns3uS_Eo994M0G5jcuU1u4rZvoC_-eJWBWvkjTkCA; .AspNetCore.Identity.Application=CfDJ8IJc2rAnMqpJumCXhgt0MUnyNzDSQsLahlSOFrZFcqIpucexRfUj1m8BCKFqZtozVu92wopRRpacWaoknYK7cjk02Gah4kRgCLFwHTiartLlGfnouyVLSUlxyJb9FRYqXsSa0BQVEJtvAAlrPPXUvkhkhcvJRylbxTBox_Y7r9GE_-iTNMndvhbR9feozfjsV6Z3dx4CHgey-pl3h5ZFC28zILbzxi_UhO9MiXQk7WwUcgJyJ7YW6Fgd6PyJPBIj460nwCfNQpwx_agDdZo04gssxLn-Kvl-LVaakKLxCF1gD6jeZ6MVnnifo6kGYBJm1z3zF3GvAanT1MU2_TdbBKWRTpcGEhWR-sek-i0oaBj281kKzeHV1VBc-BHZU9cLX4t7fC3Rpcm1GClD9iN_qkhfViKQnSLmuiiCTF24mX7nch_vvQE5DhJfiDA6tJ7kVMOrZ28CbQNPANEDaxK6H0Oid2uaRhdCasgzrtzZCs3l1ZFHB4V3gEvTtloWEtMoPHgtgUABp0XsTaDAcYL43UuPmwAiLUFNnd1g0waWzfk2whiG-rXDBn579p15CmkeNMLYRXaUrkYMdsbzX6hrbmeR8tdPNi7Vpbo-CR7JejdotdL1389t3C1DaW_uMJ5DsVxwqlTZgqCWpDKt80RHeqlGEqqF4knkVtE5n6JxVkADRErtRCOUZPjx3IhWYIpCGEEia5VFiUfz8J19ZjqP08P-w-vJx50lGt0-k7QeVjqzlNQwD4oL6iWu_T-p5vIubxeYsWqJ7mulXTHQQBSFb1LnjKHvoca8tQNUuAmUvZFJpBIWDB3TqtlvhmfeiFJahw"], "Accept": ["*/*"], "Sec-Fetch-Mode": ["cors"]}, "tls": {"resumed": false, "version": 772, "ciphersuite": 4865, "proto": "h2", "proto_mutual": true, "server_name": "brothermingstream.zapto.org"}}, "common_log": "192.168.1.166 - - [29/May/2020:04:07:10 -0400] \"GET /hls/key_720.m3u8 HTTP/2.0\" 404 0", "duration": 0, "size": 0, "status": 404, "resp_headers": {"Server": ["Caddy"]}}
5. What I already tried:
I tried reverting back to my localhost implementation of my webserver, but it did not resolve the issue. I might have not reverted exactly to how the config was when it worked.
The issue may also be due to changes I’ve done with my router settings (port forwarding 80, 443; static ip on my computer) to setup DDNS. I tried reverting those too, but no dice.