1. Caddy version 2.0.0:
2. How I run Caddy:
Caddy is running as a systemd service.
a. System environment:
Ubuntu 18.04,caddy installed from apt and running as a service
d. My complete Caddyfile or JSON config:
http:// {
redir https://{host}{uri}
}
https:// {
tls {
on_demand
}
reverse_proxy 127.0.0.1:8084
}
example.com {
reverse_proxy 127.0.0.1:8080
}
www.example.com {
reverse_proxy 127.0.0.1:8080
}
3. The problem I’m having:
example.com or www.example go to 127.0.0.1:8084 not 127.0.0.1:8080.EDIT:Alright, while writing this post i found that it worked when i left an empty space after the domain and before the bracket.Otherwise it would throw me to :8084.Is an empty space required or is this unexpected behaviour?
Using
www.example.com , example.com {
reverse_proxy 127.0.0.1:8080
}
The sites example.com work but all other domains point to :8080.So i have to make a seperate for www and non-www.Is this intended behaviour?
Thanks!