stbuehler, what would you think of extending the -t flag so that if provided more than once on command line (e.g. "-tt" or "-t -t"), that config processing continues, loads all modules, and exits after checking for unused/deprecated config keys?

Anything that with potentially destructive behavior would have to be skipped, such as overwriting pidfile. daemonizing would be disabled to keep process in foreground and stderr attached. network_init() would need to be passed an extra flags to indicate "check_only" so as not to attempt to bind() to potentially in-use addresses. plugin hooks 'init' and 'set_defaults', called by plugins_call_init() and plugins_call_set_defaults(), would need to take an "check-only" flag, too, so this would be a breaking change to third-party modules, similar to the change in 1.4.38 in r3049 which extended function signature of config_insert_values_internal(). For most modules, they would still perform their complete setup routine, but there might be a few which need to skip a few actions and the "check-only" flag would communicate that.

Instead of changing the function signatures, a much less invasive way to make the change would be to add a flag 'preflight_check' to server_config (srv->srvconf) (e.g. right along with 'dont_daemonize' member)

I looked through the code and these places would need to check for srv->srvconf.preflight_check: server.c:main() skip pidfile creation skip daemonizing skip log_error_open() network.c:network_server_init() skip bind() to sockets

Skipping error log and access log opens is not technically required for a startup test, but probably still a good idea to avoid triggering custom behavior by piped loggers server.c:main() skip log_error_open() mod_accesslog.c:log_access_open() skip open_log_file_or_pipe()