# Install
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y caddy # Serve a site with automatic HTTPS
caddy reverse-proxy --from example.com --to localhost:3000
# Install
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y caddy # Serve a site with automatic HTTPS
caddy reverse-proxy --from example.com --to localhost:3000
# Install
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y caddy # Serve a site with automatic HTTPS
caddy reverse-proxy --from example.com --to localhost:3000
example.com { reverse_proxy localhost:3000
} api.example.com { reverse_proxy localhost:8080
} static.example.com { root * /var/www/static file_server
}
example.com { reverse_proxy localhost:3000
} api.example.com { reverse_proxy localhost:8080
} static.example.com { root * /var/www/static file_server
}
example.com { reverse_proxy localhost:3000
} api.example.com { reverse_proxy localhost:8080
} static.example.com { root * /var/www/static file_server
}
example.com { reverse_proxy localhost:3001 localhost:3002 localhost:3003 { lb_policy round_robin health_uri /health health_interval 10s }
}
example.com { reverse_proxy localhost:3001 localhost:3002 localhost:3003 { lb_policy round_robin health_uri /health health_interval 10s }
}
example.com { reverse_proxy localhost:3001 localhost:3002 localhost:3003 { lb_policy round_robin health_uri /health health_interval 10s }
}
# Caddy has a REST API for dynamic config
-weight: 500;">curl http://localhost:2019/config/
-weight: 500;">curl -X POST http://localhost:2019/load -H "Content-Type: application/json" -d @config.json
# Caddy has a REST API for dynamic config
-weight: 500;">curl http://localhost:2019/config/
-weight: 500;">curl -X POST http://localhost:2019/load -H "Content-Type: application/json" -d @config.json
# Caddy has a REST API for dynamic config
-weight: 500;">curl http://localhost:2019/config/
-weight: 500;">curl -X POST http://localhost:2019/load -H "Content-Type: application/json" -d @config.json