1. Caddy version (caddy version
):
v2.4.7-0.20220219223636-186fdba916a1
2. How I run Caddy:
sudo ./caddy reverse-proxy --to 127.0.0.1:8080
a. System environment:
Solus OS (latest)
d. My complete Caddyfile or JSON config:
templates
3. The problem I’m having:
I have the following files:
wow.html:
<html>
<body>
<h1>Test!</h1>
{{include "./test.html"}}
</body>
</html>
test.html:
<p>Wow this is really cool!</p>
Now I do:
curl -k https://localhost:443/wow.html
Which returns:
<html>
<body>
<h1>Test!</h1>
{{include "./test.html"}}
</body>
</html>
This is what I get when starting Caddy, I do get a certificate error on launch, but I’m assuming that the templating is unrelated to the connection:
2022/03/02 04:42:12.784 WARN admin admin endpoint disabled
2022/03/02 04:42:12.785 INFO http server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "proxy", "https_port": 443}
2022/03/02 04:42:12.785 INFO http enabling automatic HTTP->HTTPS redirects {"server_name": "proxy"}
2022/03/02 04:42:12.785 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc0003c8000"}
2022/03/02 04:42:12.786 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}
2022/03/02 04:42:12.786 WARN tls stapling OCSP {"error": "no OCSP stapling for [localhost]: no OCSP server specified in certificate", "identifiers": ["localhost"]}
2022/03/02 04:42:12.786 INFO tls cleaning storage unit {"description": "FileStorage:/root/.local/share/caddy"}
2022/03/02 04:42:12.787 INFO tls finished cleaning storage units
2022/03/02 04:42:12.794 WARN pki.ca.local installing root certificate (you might be prompted for password) {"path": "storage:pki/authorities/local/root.crt"}
2022/03/02 05:42:12 not NSS security databases found
2022/03/02 05:42:12 define JAVA_HOME environment variable to use the Java trust
2022/03/02 04:42:12.794 ERROR pki.ca.local failed to install root certificate {"error": "install is not supported on this system", "certificate_file": "storage:pki/authorities/local/root.crt"}
2022/03/02 04:42:12.795 INFO autosaved config (load with --resume flag) {"file": "/root/.config/caddy/autosave.json"}
Caddy proxying https://localhost -> http://127.0.0.1:8080