Only default Caddy page for declared site

1. The problem I’m having:

Hi,

My Caddy setup is improving. All sites seem relatively operational and the rest is on my plate, except for one entry in the Caddyfile, the first defined website, where whatever the document location I specify, I always get the default caddy page. the dns recs seem ok with an A record to the right IP address.

Some related questions include:

Does Caddy carry multiple instances of this default Caddy page or a single one?

If there is just one:
a) how can I change/replace it ?
b) what are the default required conditions to end up on it ?
If there can be many:
a) How so ?
b) What are the rules ?

Why is it picking the first site block ?
Could the issue be related to the fact that in the /etc/hosts file, the server (host => dnaos) is declared as being in that first domain (hyperbase.com) :
<<
127.0.0.1 localhost
127.0.1.1 dnaos.hyperbase.com dnaos
69.70.39.170 dnaos.hyperbase.com dnaos
10.10.10.1 lands.hyperbase.com lands

2. Error messages and/or full log output:

N/A

3. Caddy version:

2.8.4

4. How I installed and ran Caddy:

install-caddy.sh

a. System environment:

Ubuntu 24.04

b. Command:

N/A

c. Service/unit/compose file:

N/A

d. My complete Caddy config:

{
	debug
	email webtek@hyperbase.com
}
(dynamic)  {
	handle /xml/* {
		reverse_proxy localhost:3000
	}
}
(logging)  {
	log {
		output file /var/www/log/caddy.log
		format json
	}
}
hyperbase.com www.hyperbase.com {
	import dynamic
	handle * {
		root /var/www/html/library/hyperlib/hyperbase/
		file_server
	}
	import logging
}
stratml.hyperbase.com {
	import dynamic
	handle * {
		root /var/www/html/library/hyperform/stratml/
		file_server
	}
	import logging
}
dnaos.com www.dnaos.com distributed.solutions www.distributed.solutions {
	import dynamic
	handle * {
		root /var/www/html/library/hyperlib/dnaos/
		file_server
	}
	import logging
}
01communications.com www.01communications.com 01communications.org www.01communications.org {
	import dynamic
	handle * {
		root /var/www/html/library/hyperlib/com01/
		file_server
	}
	import logging
}
cosmos-square.com www.cosmos-square.com cosmossquare.com www.cosmossquare.com square-cosmos.com www.square-cosmos.com squarecosmos.com www.squarecosmos.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermedia/c2/
		file_server
	}
	import logging
}
telepathmedia.com www.telepathmedia.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermedia/telepath/
		file_server
	}
	import logging
}
editionsconsonance.com www.editionsconsonance.com consonancepublishing.com www.consonancepublishing.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermall/consonance/
		file_server
	}
	import logging
}
accordeon101.com www.accordeon101.com accordion101.com www.accordion101.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermedia/accordeon/
		file_server
	}
	import logging
}
musicnovatory.com www.musicnovatory.com novatoire.com www.novatoire.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermedia/musnov/
		file_server
	}
	import logging
}
musicphenomenon.com www.musicphenomenon.com tunetuneup.com www.tunetuneup.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermedia/mup-en/
		file_server
	}
	import logging
}
phenomenemusique.com www.phenomenemusique.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermedia/mup-fr/
		file_server
	}
	import logging
}
grosbonchant.com www.grosbonchant.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermedia/gbc/
		file_server
	}
	import logging
}
knowledgearchitect.org www.knowledgearchitect.org knowledgesharing.solutions www.knowledgesharing.solutions {
	import dynamic
	handle * {
		root /var/www/html/library/hyperlib/kao/
		file_server
	}
	import logging
}
kebek.org www.kebek.org prosperite-solidarite.org www.prosperite-solidarite.org {
	import dynamic
	handle * {
		root /var/www/html/library/hyperform/kebek/
		file_server
	}
	import logging
}
prosperity-solidarity.org www.prosperity-solidarity.org {
	import dynamic
	handle * {
		root /var/www/html/library/hyperform/sps/
		file_server
	}
	import logging
}
andrecusson.com www.andrecusson.com {
	import dynamic
	handle * {
		root /var/www/html/library/hyperform/akhu/
		file_server
	}
	import logging
}
michelperrault.com www.michelperrault.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermall/pero/
		file_server
	}
	import logging
}
conradletendre.com www.conradletendre.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermall/letendre/
		file_server
	}
	import logging
}
jeanchatillon.com www.jeanchatillon.com {
	import dynamic
	handle * {
		root /var/www/html/library/hypermall/chatillon/
		file_server
	}
	import logging
}

5. Links to relevant resources:

Regards.

Can you please fill out the form in details? It’s critical for us to be able to answer.

This is not an installation method that we support or are aware of. Where is this from?

These fields define what may be causing your experience.

I’m not sure what this means… The default page is an HTML file placed in /usr/share/caddy, if you installed Caddy using the official apt repository. Once installed that way, you should be interacting with Caddy through systemd, i.e. using the systemctl command. If you ran Caddy via caddy run, then you could have multiple instances of Caddy running different config, though it generally shouldn’t be possible for different processes to listen on the same port.

To double check, check for all running Caddy processes on your system, maybe ps aux | grep [c]addy, and ensure you’re only running one which is managed by systemd.

Hi Mohamed,

I showed you the other day the content of the caddy-install.sh file, found at the top of Caddy’s (linux) download page:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/gpg.key’ | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf ‘https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt’ | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

I am running Caddy with systemctl and a Caddyfile at /etc/caddy/Caddyfile.

The reply to: ps aux | grep [c]addy
is: caddy 2821 0.1 0.1 1269548 51892 ? Ssl janv.07 3:22 /usr/bin/caddy run --environ --config /etc/caddy/Caddyfile

I am sorry for the noise, after a few days, and some reboots, all sites are on line. The default Caddy page does not appear any more.

Than you.

1 Like