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
0
votes
1 answer

Caddy2 pass cookie value from one reverse proxy to another

I need some help working with Caddy2 Server and the Caddyfile. Some background info: Let's say I would like to reverse proxy on 2 sites named page1.com and page2.com So for example currently page1.com is visible in localhost:8080/page1 and page2.com…
0
votes
1 answer

Caddy multi-domain reverse proxy

I'm new to Caddy server but their website looked promising. I want to use it as a reverse proxy for the websites that are hosted on other servers. So, I have 2 websites; a Wiki and a photo gallery, that needs to be hosted outside of my local…
Ravenix
  • 1,010
  • 4
  • 15
  • 40
0
votes
1 answer

Redirect root "/" to uri with parameters

Im using caddy to pass some default querystring parameter to my application by redirecting it like so: https://example.com/ --> https://example.com/?someQuery=someValue The config I tried was redir / { if {path} is / /…
FirstZer0
  • 50
  • 1
  • 6
0
votes
0 answers

Using "without" in http.proxy directive in Caddyfile in caddy

I'm using the caddy as a reverse proxy and the config is the proxy /app http://myapp:8080 { transparent insecure_skip_verify without /app } http://myapp:8080 is an Web application. Here the request https://caddy/myapp redirects the…
0
votes
2 answers

502 when redirecting from one caddy to another

So I have a Master caddy which redirects to another servers inside the LAN. The current configuration of the Master is like the following: http://example.com { proxy / http://192.168.1.153:80 { transparent } } https://example.com…
Alpha2k
  • 2,212
  • 7
  • 38
  • 65
0
votes
0 answers

How to conditionally apply gzip directive in Caddy?

I am trying to configure Caddy to only use gzip when the Referer header matches a particular domain. This is in order to mitigate a potentially BREACH attack. However, I do not see a way inside of a Caddyfile that allows me to conditionally turn on…
0
votes
0 answers

Caddy URL re-write from blog.mysite.com to mysite.com/blog

I have a ruby on rails application running, and I use caddy for reverse proxy. I have my blog generated by jekyll, being served from github.com, to the domian - blog.mysite.com What edits do I need to do in my Caddyfile serving mysite.com so that,…
apcelent
  • 1,651
  • 12
  • 12
0
votes
1 answer

Importing Caddy into go project fails on dependencies

I want to import Caddy into a go project but I can't seem to bring up even the most basic examples. I tried pulling the dependencies with dep or go mod with both failing miserably. dep init No versions of golang.org/x/text met constraints: …
Romeo Mihalcea
  • 9,714
  • 12
  • 50
  • 102
0
votes
2 answers

Caddy + Organizr + Plex Media Server = Can't connect to PMS?

Ultimately my goal is to be able to load my PMS admin interface via Organizr. I had already tried simply using the URL https://app.plex.tv/desktop through Organizr, but that URL disallows loading the page in iFrames, so now I'm trying to use Caddy…
J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
0
votes
1 answer

Caddy Server error: "Caddyfile:12 - Error during parsing: Unknown directive 'CLOUDFLARE_API_KEY'"

New to using Caddy server and fighting with the Caddyfile... This is the current Caddyfile that I have; when I type "caddy" from the command line, from within the same folder, I get the following error: Caddyfile:12 - Error during parsing: Unknown…
J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
0
votes
1 answer

Caddy Server error: "Error during parsing: Unknown directive 'if'"

New to using Caddy server and fighting with the Caddyfile... This is the current Caddyfile that I have; when I type "caddy" from the command line, from within the same folder, I get the following error: Caddyfile:3 - Error during parsing: Unknown…
J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
0
votes
1 answer

Caddy serves wrong SSL cert

The problem is described in this issue: https://github.com/mholt/caddy/issues/1303 I want to fix this information leakage (giving an attacker the opportunity to enumerate all the different hosts served on my webserver). Does somebody know how to fix…
Olaf
  • 1
0
votes
1 answer

How to serve both http and https with Caddy?

How should I configure Caddy to serve both http and https instead of redirecting by default to https? http://example.com/info https://example.com/info Background: We have a Windows program that connects to one of our domains to retrieve information…
equalium
  • 1,241
  • 2
  • 12
  • 18
0
votes
0 answers

Caddy throws duplicate site address with production.yml django cookie cutter

I'm using Django cookie cutter docker project trying to host on digital ocean. I tried to bring it up, It worked fine once, but later I made some changes to django code and had to restart it. So I stopped all the thins and fired up command again…
venkateswar
  • 145
  • 1
  • 8
0
votes
2 answers

Issues encountered on a fresh installation of RocketChat (1524) on Ubuntu

I have just downloaded and installed latest Rocket.chat using SNAP tool on Ubuntu (16.04 LTS). Overall, I had a smooth experience of installing and getting started with Rocket.chat. However, I did find a few serious issues. I try to get auto SSL…
ZX999
  • 63
  • 5
1 2 3
9
10