Ludovic Courtès writes: >> I wonder if some errors could be caught at build time, before attempting >> to start the service. >> >> If in the derivation to build the configuration file, nginx is run >> against the built config file with -t, that might spot errors at >> derivation build time. > > Yeah, this is probably doable. > > I would consider it a stop-gap measure though. Fundamentally, I think > we should make it so that, by construction, invalid (or at least > syntactically-invalid) config files cannot be produced. Catching errors earlier is better, but being able to catch any syntactic issues that have snuck through, as well as semantic ones when building the configuration would be good I think. I haven't actually tested out the NGinx configuration check functionality though, so I'm guessing about what it does.