1. Caddy version (caddy version
):
caddy version 2.3.0
2. How I run Caddy:
{
on_demand_tls {
ask https://lave.live/domain/verify
interval 2m
burst 5
}
}
www.lave.live {
redir https://lave.live{uri}
}
lave.live {
root * /home/forge/lave.live/public
encode zstd gzip
file_server
php_fastcgi unix//var/run/php/php8.1-fpm.sock
}
:443 {
tls {
on_demand
}
root * /home/forge/lave.live/public
encode zstd gzip
file_server
php_fastcgi unix//var/run/php/php8.1-fpm.sock
}
a. System environment:
Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-109-generic x86_64)
b. Command:
Paste command here.
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddyfile or JSON config:
Paste config here, replacing this text.
Use `caddy fmt` to make it readable.
DO NOT REDACT anything except credentials.
LEAVE DOMAIN NAMES INTACT.
Make sure the backticks stay on their own lines.
3. The problem I’m having:
So i heard about caddy and moved from Nginx . I created a test droplet via digitalocean and everything worked fine . I was able to use custom domain names with ssl generated etc.
I decided to move this to my main application.
So my application is a multitenant application which allows custom domain. It has two application servers, one database server all behind a load balancer. My issue is how to get the root to point to my application servers.
With my test server, everything worked perfectly because it was a single server so was able to point to the root project file. (Its a laravel project)
However, on my main application, my entry point to my domain hits my load balancer and not an application server so my root code says HTTP ERROR 404
Im pretty new to this so any help would be appreciated. Thank you
4. Error messages and/or full log output:
May 18 12:33:09 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877189.333417,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“www.lave.live”,“error”:"no information found to solve ch>
May 18 12:33:09 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877189.334122,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“www.lave.live”,“error”:"no information found to solve ch>
May 18 12:33:09 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877189.5672505,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“lave.live”,“error”:"no information found to solve chall>
May 18 12:33:09 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877189.5677433,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“lave.live”,“error”:"no information found to solve chall>
May 18 12:40:31 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877631.5532804,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“www.lave.live”,“error”:"no information found to solve c>
May 18 12:40:31 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877631.5533555,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“www.lave.live”,“error”:"no information found to solve c>
May 18 12:40:31 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877631.7869983,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“www.lave.live”,“error”:"no information found to solve c>
May 18 12:40:31 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877631.7876177,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“www.lave.live”,“error”:"no information found to solve c>
May 18 12:40:32 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877632.0230482,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“lave.live”,“error”:"no information found to solve chall>
May 18 12:40:32 lave-load-balancer caddy[3189]: {“level”:“error”,“ts”:1652877632.02355,“logger”:“tls.issuance.acme”,“msg”:“looking up info for HTTP challenge”,“host”:“lave.live”,“error”:"no information found to solve challen>
~