1. Caddy version (2.4.1
)
2. How I run Caddy:
Reverse proxy domain to internal service
a. System environment:
Raspberry Pi 4 8GB running Ubuntu Server LTS 20.04.2 LTS
b. Command:
caddy run
d. My complete Caddyfile or JSON config:
azurn.net {
reverse_proxy localhost:8080
}
3. The problem I’m having:
I’m new to using Caddy and Cloudflare with my own domain to reverse proxy a few subdomains to services I have running. In short, I want to have https://azurn.net go to localhost:8080 which is hosting Vaultwarden. (Smaller self hosted Bitwarden) Yet I cannot get Cloudflare and Caddy to work together and forward the user onto a service running locally.
4. Error messages and/or full log output:
* Trying 104.21.0.231:80...
* TCP_NODELAY set
* Connected to azurn.net (104.21.0.231) port 80 (#0)
> GET / HTTP/1.1
> Host: azurn.net
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 301 Moved Permanently
< Date: Sat, 05 Jun 2021 00:55:31 GMT
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: max-age=3600
< Expires: Sat, 05 Jun 2021 01:55:31 GMT
< Location: https://azurn.net/
< cf-request-id: 0a7b44124a0000c55c013e4000000001
< Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v2?s=SxELsayYPPOtndLypl2f7VcuIzcUZUAdPpXv6cAMQZS30yGpDQyoZia1rr2A%2B%2BYUB3Gyw%2BJ7Ohp%2F9ywp%2FptxCzs%2FDyATP17oNrRYWf1ImjdD1OZE%2BoQW"}],"group":"cf-nel","max_age":604800}
< NEL: {"report_to":"cf-nel","max_age":604800}
< Server: cloudflare
< CF-RAY: 65a56f96dda6c55c-ORD
< alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400
<
* Connection #0 to host azurn.net left intact
5. What I already tried:
I’ve ensured that my DNS settings are set to my IP, and have tried other IPs to other public services, which work fine. Clearing the cahce for the domain and putting developer mode on to bypass Cloudflare along with not proxying anything through cloudflare.
6. Links to relevant resources:
Website: https://azurn.net
Vaultwarden: GitHub - dani-garcia/vaultwarden: Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs