Questions tagged [caddy]

Caddy, sometimes clarified as the Caddy web server, is an open source, HTTP/2-enabled web server written in Go. It uses the Go standard library for its HTTP functionality and supports HTTPS out of the box.

18 questions
4
votes
1 answer

How to Maintain All Headers Through Reverse Proxy with Caddy

I am using Caddy as a reverse proxy so that I only need to have 2 ports open in my gateway (one for http and one for https). I would prefer to use 80 and 443, but my UniFi USG (Gateway) interferes with 443 and breaks SSL. If I choose another port…
Lance McCarthy
  • 143
  • 1
  • 5
3
votes
1 answer

Caddy always tries to bind to port 80, regardless of the address in Caddyfile

Caddy v2.2.1 doesn't seem to respect the port of a given address in this Caddyfile: myfinedomain.com:9999 { respond "Nothing to see here. Srsly." } Starting up caddy simply results in the following error (taken from the…
Windowlicker
  • 210
  • 2
  • 9
3
votes
2 answers

Which matcher does Caddy pick when there is a conflict?

Directives in an Caddyfile can have "matchers" that limit them to specific requests. This lets Caddy 2 serve different content for different paths, but what happens when multiple directives match the same request? If I want to serve a mostly-static…
1
vote
2 answers

Caddy reverse proxy curl works internally, but externally returns content-length: 0

Background and Problem I'm trying to set up Caddy as a reverse proxy between two other web applications and a static file server (all on one machine). When I curl the internal IP, it works as expected, but when I try to curl the external IP, it…
claypooj
  • 123
  • 5
1
vote
0 answers

using custom domain in caddy gives tls error

I have the following caddy file - localhost { respond "Hello World !" } auth.demo.app.com { respond "Hello auth app" } When I do a sudo caddy reload I get the following error - 2021/01/23 08:05:07.347 ERROR tls job failed …
murtaza52
  • 151
  • 9
1
vote
2 answers

Self host gitlab using caddy

I'm trying to install and host gitlab, but it requires and pulls in Nginx. Which would be fine, except I use Caddy and Caddy doesn't play well with Nginx and has to be disabled for Nginx to even start. I like Caddy a lot, especially the built in…
unixandria
  • 171
  • 11
0
votes
1 answer

Can I stop Apache2 server with Caddy in docker container

I'm running a container with Caddy. My website is properly working. I can access it. The problem is that whenever I visit any page on my website - I can see apache2 that takes a lot of CPU (in top). Can I safely stop & delete apache service since…
Marek
  • 101
  • 2
0
votes
1 answer

Caddyfile header directive unable to override file_server ETag

Invoking caddy run against the Caddyfile: http://localhost header ETag forcedValue file_server I expect curl -v http://localhost/Caddyfile to show a response with the ETag forcedValue. Instead, a generated tag based on the Caddyfile's mtime and…
Charles Duffy
  • 946
  • 2
  • 10
  • 19
0
votes
0 answers

kubernetes responding with 502

I have a cluster running 2 deployments and an ingress (caddy). One of my deployments is working fine, its a golang image listening on 80. The other deployment is a php-fpm image listening on 9000, when I make any request to the php-fpm domain, it…
wcb
  • 1
0
votes
0 answers

Cannot move Caddy server to new IP with same domain

After moving a site to a new server/IP (completely new setup) the server became unavailable, cur says: curl: (35) error:1404B438:SSL routines:ST_CONNECT:tlsv1 alert internal error I assume there is some issue with the fact that caddy issued a cert…
0
votes
0 answers

EC2 with a Caddy + Gunicorn setup sporadically unreachable

I have an EC2 instance that runs a Django via gunicorn, in which Caddy sits on top of. The domain is hosted in Route53 with an A record pointing to the IP address of the instance. Here's what I currently have: #…
Alcher
  • 1
  • 1
0
votes
0 answers

How to have one tls directive apply to all domains in my Caddyfile?

I'm running Caddy on Debian 11. Here's what my Caddyfile looks like. I've removed my domain name [subdomain name removed].example.org { tls /certs/_.example.org.crt /certs/_.example.org.key reverse_proxy :8002 } [subdomain name…
cocomac
  • 116
  • 1
  • 5
0
votes
0 answers

Where would Caddy2 fit into our server (possibly AWS) architecture chain for enabling custom domains and subdomains?

I'm in the process of re-architecting our web application so that it's more scalable. One of the requirements is to allow customers to point custom domains AND subdomains at our site, which our Laravel PHP application will work with to determine the…
0
votes
1 answer

i/o timeout when trying to renew letsencrypt certificate

I am running a webserver using caddy 1, which is supposed to renew https certificates automatically using letsencrypt but is having trouble doing so. In the server's logs I see this: 2022/01/14 04:03:47 [ERROR] Making new certificate manager: get…
0
votes
0 answers

Caddy "CSR doesn't contain a SAN short enough to fit in CN"

The Common Name (CN) in a TLS certificate is documented to have a limit of 64 chars. The trick when issuing a cert for a so long subdomain is to set the CN to something else (shorter) and have the certificate to certify multiple domains, as the…
Xavi Montero
  • 355
  • 3
  • 18
1
2