Can't find logs, yet

1. The problem I’m having:

Hi,

My Caddy setup is improving. All sites seem relatively operational and the rest is on my plate.

All sites in the Caddyfile declare logging, all to a common log-file: /var/www/log/caddy.log. That file does not seem to exists and /var/log/caddy is empty.

Where or how can I find the logs, or what am I missing ?

Thank you

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:

Hi,

For some background, I am planning to process the logs, as XML.

Getting the logs in xml directly from Caddy seems ideal,
but json should be ok as I can convert and process it.

Whether all logs go to one file or to separate files does not seem critical. A single file seemed more straight-forward.

In the mean time, I hope that I would be getting some log info, but nothing yet it seems, so I must be missing a clue which I have not found in the documentation, yet.

Thank you for your much appreciated support.
Regards.

Have you confirmed that the log directory is owned by caddy and that it has permissions to write into it? Here’s how I do that on Red Hat Linux

3 Likes