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

Caddy server with proxy to hugo server failing to load CSS

I'm running a caddy server on a linode instance with debian installed. I'm using the caddy server to proxy to a hugo server. The hugo server works locally, but does not through the caddy server. It will load the content, but style.min.css and the…
Busch
  • 857
  • 10
  • 29
0
votes
1 answer

Caddyfile Subdomain with Multiple Proxies

i am new to using caddy and i am trying to figure out how to create a subdomain that can proxy to different endpoints based on path. for example for a subdomain called pets in the domain my-website.com. i want to route the path /cats to serviceA and…
X0r0N
  • 1,816
  • 6
  • 29
  • 50
0
votes
1 answer

caddy use placeholder error

i want to write one config for multiple sites. these sites domain will like : x.localhost, y.localhost but occur some errors. this is error message: caddy_1 | 18/Jan/2018:09:33:43 +0000 [ERROR 0 /index.php] Primary script…
Xiu Hong
  • 181
  • 2
  • 8
0
votes
0 answers

Serving a website using Caddy

I have created an application and want to serve it using caddy. On my localhost if I run the application on 127.0.0.1:9000 and set it as proxy in the caddyfile it works. I figured I have to serve my website similarly on my production as well. Now I…
Shaurya Chaudhuri
  • 3,772
  • 6
  • 28
  • 58
0
votes
1 answer

How to run Caddy from Docker container? (443 bind: permission denied)

As you would asume, I'm just starting to work with Docker and Caddy but I'm haven't being able to run it since I'm getting the following error: Could not start HTTPS server for challenge -> listen tcp :443: bind: permission denied Here is the…
0
votes
1 answer

I get a "hostname in certificate didn't match" error when trying to connect to a Caddy website in my Android app

Good afternoon, as said in the title, I'm unable to connect to a subdomain on my caddy-powered website in my Android app. I'm migrating the backend of the app from Heroku to my own digitalocean droplet and the app used to work while it was using…
chenshuiluke
  • 319
  • 1
  • 16
0
votes
1 answer

Dynamic routes not working in React with Caddy

I have a React Application. I am using some routes that receives parameters in the URL (by GET), for example myapp.com/products/1 that works pretty good in local enviroment but no in my CentOS server. I have to mention that I am using npm run build…
Sredny M Casanova
  • 4,735
  • 21
  • 70
  • 115
0
votes
0 answers

Serving Static site with Caddy gives connection refused

I have caddy installed and running in my CentOS server,mainly I have it to proxy request to 2 Golang applications that I have running and it's working great! Now, I need to serve a static site, but i't returning connection refused The structure of…
Sredny M Casanova
  • 4,735
  • 21
  • 70
  • 115
0
votes
0 answers

docker caddy proxy not forwarding

So I set up the caddy server using docker and have set it to proxy to another docker image that is running nodejs. However, when i hit the url it is routing to caddyserver.com instead of my nodejs. Is there something that I am missing: myserver { …
0
votes
1 answer

I can't connect to a https site server by Caddy using curl

I am trying to contact a https site served by Caddy . I get an error when trying to get the content with CURL even with CURLOPT_SSL_VERIFYPEER => false There is a certain amount of worry about setting this to false anyway.
Toby Allen
  • 10,997
  • 11
  • 73
  • 124
-1
votes
1 answer

Using caddy to serve a tracking pixel (base64 encoded)

I am trying to setup a very simple beacon (pixel tracking) server. Currently all I want to do is have caddy respond with a 1px transparent gif to every request. The URLs will be logged and then we'll parse out the analytics data we're after. …
patrickdavey
  • 1,966
  • 2
  • 18
  • 25
-1
votes
1 answer

SocketIO: Websocket connection failed with Caddy File on Production Server

I want to connect my SocketIO Client with the Backend. But if i use my Caddy File the Connection fails: Caddyfile: www.XXX.XXX:443 { tls XXX.XXX@XXX.de root * /srv route { reverse_proxy /api* api-server:8443 try_files…
SilasUe
  • 9
  • 2
-2
votes
1 answer

Regular expression negative lookaheads RE2 syntax used by Caddy

When translating my Apache and Nginx configuration to Caddyfile, I'm having a problem with a regular expression. I use the following in Apache to restrict access to files and directories that start with a dot (.) and are not in the .well-known…
obeN
  • 416
  • 1
  • 5
  • 16
1 2 3
9
10