1. Caddy version (v2.2.1
):
2. How I run Caddy:
using api http://127.0.0.1:2019/config/
a. System environment:
ubuntu 18
b. Command:
curl --header "Content-Type: application/json" \
--request PATCH \
--data '{
"apps":{
"http":{
"servers":{
"srv0":{
"listen":[
":443"
],
"routes":[
{
"match":[
{
"host":[
"sub.domain1.tls"
]
}
],
"handle":[
{
"handler":"reverse_proxy",
"upstreams":[
{
"dial":"unix//path/to/sub.domain1.sock"
}
]
}
]
}
]
}
}
}
}
}' \
http://localhost:2019/config/
c. Service/unit/compose file:
paste full file contents here
d. My complete Caddyfile or JSON config:
{
"apps":{
"http":{
"servers":{
"srv0":{
"listen":[
":443"
],
"routes":[
{
"match":[
{
"host":[
"sub.domain1.tls"
]
}
],
"handle":[
{
"handler":"reverse_proxy",
"upstreams":[
{
"dial":"unix//path/to/sub.domain1.sock"
}
]
}
]
}
]
}
}
}
}
}
3. The problem I’m having:
i am using gunicorn socket. i have done in caddy file using socket file but i cant in json config.
Working caddyfile arebellow.
thank you for your help.
# /etc/caddy/Caddyfile
sub.domain1.tls {
reverse_proxy unix//path/to/sub.domain1.sock
}