Questions tagged [caddy]

Caddy is a configurable web server written in Go that supports modern features such as HTTP/2, IPv6, Markdown, WebSockets, FastCGI, templates and more, right out of the box.

Caddy is a configurable web server created by Matt Holt. It's written in and available for Windows, Mac, Linux, and BSD.

Caddy became famous, among other things, for being the first web server to support automatic provisioning of SSL certificates via Let's Encrypt.

It also supports modern features such as HTTP/2, IPv6, Markdown, WebSockets, FastCGI, templates and more, right out of the box.

Caddy is highly configurable using a configuration file called Caddyfile.

338 questions
16
votes
2 answers

Access a Caddy server by IP

I have a website with docker and I use caddy for production. This is my configuration on my Caddyfile mydomain.com { proxy / django:5000 { header_upstream Host {host} header_upstream X-Real-IP {remote} header_upstream…
Marcos Aguayo
  • 6,840
  • 8
  • 28
  • 61
15
votes
4 answers

Caddy - Setting HTTPS on local domain

I would like to add HTTPS to my local domain, however we can't do this on localhost. My website goes fine when I run with this Caddyfile localhost:2020 { bind {$ADDRESS} proxy / http://192.168.100.82:9000 { transparent } } But I would…
Alexi Coard
  • 7,106
  • 12
  • 38
  • 58
13
votes
2 answers

Caddy configuration for Wordpress multisite

I'm trying to setup a Wordpress website with multisite: example.com example.com/fr With the following Caddyfile: example.com:80 { redir https://www.example.com{uri} } www.example.com:80 { root /app/public gzip fastcgi /…
Samber
  • 153
  • 1
  • 8
12
votes
2 answers

Caddy - How to disable https only for one domain

I have a config file for Caddy v2 like in below: sentry.mydomain.ru { reverse_proxy sentry:9000 } tasks.mydomain.ru { reverse_proxy taiga-proxy:80 } ain.mydomain.ru { reverse_proxy ain-frontend:80 } Caddy makes https for every domain…
Konstantin
  • 123
  • 1
  • 1
  • 5
11
votes
1 answer

Caddy as reverse proxy to rewrite a http redirect url from an upstream response

I am having a backend that is not able when running behind a reverse proxy since I cannot configure a custom base URL. For the login process the backend makes heavy use of HTTP redirects but due to the fact that is behind a reverse proxy it sends…
saw303
  • 8,051
  • 7
  • 50
  • 90
10
votes
3 answers

Caddy V2 IP whitelist

I am trying to implement IP whitelist on my Caddy v2 configuration. Something equivalent to NGINX configuration like: allow 1.1.1.1; allow 8.8.8.8; deny all; My current Caddy configuration pretty straight forward: my.website.com { …
Dikobraz
  • 649
  • 2
  • 8
  • 22
10
votes
2 answers

How to configure Caddy 2 in docker-compose file to do reverse proxy without a bind mounted Caddyfile?

I have a docker-compose file with two services: my webapp, it exposes port 3000 caddy, it works as reverse proxy for my web app and gives HTTPS It works fine if I use a bind mounted Caddyfile: caddy: image: caddy:2.0.0-alpine ports: …
Max Block
  • 1,134
  • 3
  • 16
  • 23
10
votes
3 answers

Specify Caddy listening port

"By default, Caddy will bind to ports 80 and 443 to serve HTTPS and redirect HTTP to HTTPS." (https://caddyserver.com/docs/automatic-https) How can we change this port? Background: In our setup, Caddy runs behind an AWS load balancer which forwards…
NtlX
  • 103
  • 1
  • 1
  • 4
10
votes
2 answers

caddy.service start request repeated too quickly

I'm using systemd to start a caddy webserver on an ubuntu 16.04 machine. Whenever I run sudo service caddy start and service caddy status, I get this error: ● caddy.service - Caddy webserver Loaded: loaded (/etc/systemd/system/caddy.service;…
ki9
  • 5,183
  • 5
  • 37
  • 48
9
votes
4 answers

Vite Reload Loop

I am trying to finish a migration away from Parcel and into Vite. We use caddy to reverse proxy a custom domain locally through a Docker container. The issue I'm having is that when I load the client in browser it continuously refreshes, the console…
Jason Long
  • 71
  • 3
  • 9
9
votes
1 answer

Caddy as reverse proxy in docker refuses to connect to other containers

I wanted to try out Caddy in a docker environment but it does not seem to be able to connect to other containers. I created a network "caddy" and want to run a portainer alongside it. If I go into the volume of caddy, I can see, that there are certs…
modmoto
  • 2,901
  • 7
  • 29
  • 54
9
votes
2 answers

Reverse Proxy for Web Sockets (WSS) using Caddy

Project GitHub URL I have just started using caddy. I have made a simple chat application which I am serving using caddy. The WebSockets are served on ws instead of wss by the application, similar to how the application is served on HTTP and not…
Shaurya Chaudhuri
  • 3,772
  • 6
  • 28
  • 58
8
votes
1 answer

Error: Package: caddy-2.4.6-1.el9.x86_64 (copr:copr.fedorainfracloud.org:group_caddy:caddy) Requires: libc.so.6(GLIBC_2.34)(64bit)

Am trying to get ssl working on my ec2 instance, but sudo yum caddy install tells me i need to have Requires: libc.so.6(GLIBC_2.34)(64bit) which by the way i cant find a way to install it on linux ec2 server
ndotie
  • 1,830
  • 17
  • 18
8
votes
0 answers

Can Caddy V1 apply GZIP compression to a proxied response?

I'm running Caddy v1 as a reverse proxy and I would like to apply GZIP compression on e.g. JSON responses. I noticed that the gzip Caddy v1 directive only applies on files Caddy serves its self but not on responses where Caddy runs a reverse proxy…
saw303
  • 8,051
  • 7
  • 50
  • 90
8
votes
1 answer

Permission denied on mkdir inside of a django Docker container when running collectstatic

I've modified django-cookiecutter default production template to make caddy web server serve static files. I'm using volumes to map the ./static directories in django and caddy containters through host ./static directory, but I'm getting permissions…
Daniel
  • 307
  • 5
  • 15
1
2 3
22 23