Questions tagged [caddyfile]

The term Caddyfile describes a text file that changes how an instance of the Caddy web server works.

Definition:

The Caddyfile is the configuration file of the web server.

It is similar in purpose to httpd.conf or nginx.conf.

The Caddyfile file can be named anything, but by default, Caddy will look for a file called Caddyfile in the current directory.

Example Usage:

example.com {
    root /www/example.com
}

sub.example.com {
    root /www/sub.example.com
    gzip
    log ../access.log
}

Important Links:

148 questions
1
vote
1 answer

Serve markdown with Caddy2

I want to serve a single markdown file with Caddy v2, rendered as html. The old Caddy v1 had the markdown directive, which is gone. Instead I found the template directive, but it does not render the markdown files…
Dag
  • 10,079
  • 8
  • 51
  • 74
1
vote
0 answers

caddy webserver - website domin configuration

I want to use Caddy webserver in docker container, it works locally correctly, but when I set the domain name in caddy configuration, I can not connect to my web pages. Below is simple caddy configuration /etc/caddy/Caddyfile # domain…
Meraj Kashi
  • 283
  • 1
  • 8
  • 18
1
vote
0 answers

How to set Caddy as a reverse proxy for apache

Caddy 2 is a powerful, open source web server with automatic HTTPS written in Go. I have a web app where users can point their custom domains. So caddy can easily generate ssl with tls on demand. https://caddyserver.com/docs/automatic-https So I…
Cybil K
  • 96
  • 10
1
vote
2 answers

How to set Caddyfile log format?

I am using caddy 2 as my proxy. and I try to set my caddy log format. localhost:80 { reverse_proxy example:80 log { output net logstash:5140 format single_field common_log } } on version 1 there are predefined…
user3392555
  • 43
  • 2
  • 7
1
vote
0 answers

Is it possible to listen to multiple ports in Caddy 1.x with the same setting?

For example, instead of: :81 { tls /etc/xxx/xxx.crt /etc/xxx/xxx.key proxy / 127.0.0.1:8080 { transparent } } :82 { tls /etc/xxx/xxx.crt /etc/xxx/xxx.key proxy / 127.0.0.1:8080 { transparent } } ... :443 { tls…
Aero Wang
  • 8,382
  • 14
  • 63
  • 99
1
vote
1 answer

Let's Encrypt ACME ID in Caddy

I'm trying to define a ACME account ID 1234567 within the Caddy webserver to validate Let's Encrypt certificates. The documentation is pretty elaborate on tls automation and ACME options, but I couldn't find any way to implement an account ID. Does…
Olivier
  • 43
  • 5
1
vote
1 answer

HMR for Local Vue.js App Over HTTPS Setup Shows Cross-Origin Request Blocked

1. My Caddy version (caddy -version): v2.0.0-beta.13 h1:QL0JAepFvLVtOatABqniuDRQ4HmtvWuuSWZW24qVVtk= 2. How I run Caddy: a. System environment: I am using caddy server static binary on macOS Mojave - 10.14.6, and make the binary available as caddy…
Ahmed Shendy
  • 1,424
  • 15
  • 28
1
vote
0 answers

How to install a proof-of-work proxy server on raspberry pi 3B

I am trying to install a proof-of-work proxy server from the link: https://docs.iota.org/docs/node-software/0.1/iri/how-to-guides/install-a-pow-proxy on Raspberry Pi 3B. However, when I try to build an executable file at step 4, I get the following…
user3582228
  • 181
  • 2
  • 14
1
vote
3 answers

Docker refusing connection on port 443

I'm setting up my AWS EC2 instance. I wanted to let that instance access via https but I get a This is what I tried run docker pull abiosoft/caddy Put Caddyfile in home folder Run mkdir -p $HOME/caddycerts; chmod ugo+rwx $HOME/caddycerts; Run…
Siddharthan Asokan
  • 4,321
  • 11
  • 44
  • 80
1
vote
2 answers

Caddy rewrite based on User-Agent not working

I'm trying to rewrite a path if the requested client is a mobile user. As per caddy documentation, this code should redirect a mobile user to the specified destination. rewrite /redirect-me { if {>User-Agent} has mobile to /redirected } But…
Robin
  • 446
  • 2
  • 4
  • 24
1
vote
1 answer

Caddy with Cloudflare 502 bad gateway error

I have app running on port - 3000 and running with caddy reverse proxy at port 80 and 443. It works fine, but as soon as I switch to cloudflare, the site gets down and shows error 502 bad gateway
user3767643
  • 674
  • 2
  • 9
  • 25
1
vote
1 answer

Caddy proxy in docker gives empty response

I have a docker container running Caddy, and another web server. In my Dockerfile I have EXPOSE 80 10240 # 10240 is the port of the other webserver. And I run docker like this (don't ask my why you need EXPOSE and -p). docker run -p 80:80 -p…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
1
vote
0 answers

Activecollab htaccess convert to Caddyfile

please help with converting the htaccess file into caddyfile. We tried it with self-help but unsuccessfully. Can you look at it and help? Thank you Options -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f…
1
vote
1 answer

Switching Atlassian Confluence under Caddy instead of NGINX

So I recently started getting issues with NGINX crashing for unknown reasons. After passing to much time on trying to fix it I decided to move to Caddy instead. My caddy configuration works for navigating the website, but it breaks the /synchrony…
Joel Bourbonnais
  • 2,618
  • 3
  • 27
  • 44
1
vote
0 answers

Can rocket.chat be server on 2 interfaces at the same time?

here is the situation, we have a domain, let's say example.com I have added a subdomain to the dns, chat.example.com I have modified the Caddyfile inserting http://chat.example.com (it works fine) However, rocket.chat is hosted on our local…
Pampa Nello
  • 206
  • 5
  • 16