29#define APR_WANT_STRFUNC
68 printf(
"yes (variable thread count)\n");
71 printf(
"yes (fixed thread count)\n");
84 printf(
"yes (variable process count)\n");
87 printf(
"yes (fixed process count)\n");
99 printf(
"Server's Module Magic Number: %u:%u\n",
101#if APR_MAJOR_VERSION >= 2
102 printf(
"Server loaded: APR %s, PCRE %s\n",
104 printf(
"Compiled using: APR %s, PCRE %s\n",
107 printf(
"Server loaded: APR %s, APR-UTIL %s, PCRE %s\n",
110 printf(
"Compiled using: APR %s, APR-UTIL %s, PCRE %s\n",
118 printf(
"Architecture: %ld-bit\n", 8 * (
long)
sizeof(
void *));
122 printf(
"Server compiled with....\n");
123#ifdef BIG_SECURITY_HOLE
124 printf(
" -D BIG_SECURITY_HOLE\n");
127#ifdef SECURITY_HOLE_PASS_AUTHORIZATION
128 printf(
" -D SECURITY_HOLE_PASS_AUTHORIZATION\n");
136 printf(
" -D HAVE_SHMGET\n");
139#if APR_FILE_BASED_SHM
140 printf(
" -D APR_FILE_BASED_SHM\n");
144 printf(
" -D APR_HAS_SENDFILE\n");
148 printf(
" -D APR_HAS_MMAP\n");
152 printf(
" -D NO_WRITEV\n");
156 printf(
" -D NO_LINGCLOSE\n");
160 printf(
" -D APR_HAVE_IPV6 (IPv4-mapped addresses ");
161#ifdef AP_ENABLE_V4_MAPPED
168#if APR_USE_FLOCK_SERIALIZE
169 printf(
" -D APR_USE_FLOCK_SERIALIZE\n");
172#if APR_USE_SYSVSEM_SERIALIZE
173 printf(
" -D APR_USE_SYSVSEM_SERIALIZE\n");
176#if APR_USE_POSIXSEM_SERIALIZE
177 printf(
" -D APR_USE_POSIXSEM_SERIALIZE\n");
180#if APR_USE_FCNTL_SERIALIZE
181 printf(
" -D APR_USE_FCNTL_SERIALIZE\n");
184#if APR_USE_PROC_PTHREAD_SERIALIZE
185 printf(
" -D APR_USE_PROC_PTHREAD_SERIALIZE\n");
188#if APR_USE_PTHREAD_SERIALIZE
189 printf(
" -D APR_USE_PTHREAD_SERIALIZE\n");
192#if APR_PROCESS_LOCK_IS_GLOBAL
193 printf(
" -D APR_PROCESS_LOCK_IS_GLOBAL\n");
196#ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
197 printf(
" -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT\n");
200#if APR_HAS_OTHER_CHILD
201 printf(
" -D APR_HAS_OTHER_CHILD\n");
204#ifdef AP_HAVE_RELIABLE_PIPED_LOGS
205 printf(
" -D AP_HAVE_RELIABLE_PIPED_LOGS\n");
209 printf(
" -D BUFFERED_LOGS\n");
217#if APR_CHARSET_EBCDIC
218 printf(
" -D APR_CHARSET_EBCDIC\n");
221#ifdef NEED_HASHBANG_EMUL
222 printf(
" -D NEED_HASHBANG_EMUL\n");
238#ifdef DEFAULT_SCOREBOARD
242#ifdef DEFAULT_ERRORLOG
246#ifdef AP_TYPES_CONFIG_FILE
250#ifdef SERVER_CONFIG_FILE
255#define TASK_SWITCH_SLEEP 10000
295 if (process->
pconf) {
311 const char *failed =
"apr_app_initialize()";
315 failed =
"apr_pool_create()";
332 "to initial context, exiting\n",
357#if AP_HAS_THREAD_LOCAL
365 "to initialize thread context, exiting\n",
378 const char *
bin = process->
argv[0];
382 "Usage: %s [-D name] [-d directory] [-f file]",
bin);
385 " %*s [-C \"directive\"] [-c \"directive\"]",
pad_len,
" ");
389 " %*s [-w] [-k start|restart|stop|shutdown] [-n service_name]",
392 " %*s [-k install|config|uninstall] [-n service_name]",
399 " %*s [-k start|restart|graceful|graceful-stop|stop]",
403 " %*s [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]",
409 " -D name : define a name for use in "
410 "<IfDefine name> directives");
412 " -d directory : specify an alternate initial "
415 " -f file : specify an alternate ServerConfigFile");
417 " -C \"directive\" : process directive before reading "
420 " -c \"directive\" : process directive after reading "
425 " -n name : set screen name");
429 " -n name : set service name and use its "
430 "ServerConfigFile and ServerRoot");
432 " -k start : tell Apache to start");
434 " -k restart : tell running Apache to do a graceful "
437 " -k stop|shutdown : tell running Apache to shutdown");
439 " -k install : install an Apache service");
441 " -k config : change startup Options of an Apache "
444 " -k uninstall : uninstall an Apache service");
446 " -w : hold open the console window on error");
450 " -e level : show startup errors of level "
453 " -E file : log startup errors to file");
455 " -v : show version number");
457 " -V : show compile settings");
459 " -h : list available command line options "
462 " -l : list compiled in modules");
464 " -L : list available configuration "
467 " -t -D DUMP_VHOSTS : show parsed vhost settings");
469 " -t -D DUMP_RUN_CFG : show parsed run settings");
471 " -S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG");
473 " -t -D DUMP_MODULES : show all loaded modules ");
475 " -M : a synonym for -t -D DUMP_MODULES");
477 " -t -D DUMP_INCLUDES: show all included configuration files");
479 " -t : run syntax check for config files");
481 " -T : start without DocumentRoot(s) check");
483 " -X : debug mode (only one worker, do not detach)");
520#if APR_CHARSET_EBCDIC
529 sizeof(
const char *));
531 sizeof(
const char *));
533 sizeof(
const char *));
629 *
new =
"DUMP_VHOSTS";
631 *
new =
"DUMP_RUN_CFG";
637 *
new =
"DUMP_MODULES";
710 process->
pconf, ptemp);
723 NULL,
APLOGNO(00014)
"Configuration check failed");
801 APLOGNO(00017)
"Pre-configuration failed, exiting");
820 APLOGNO(00018)
"Configuration check failed, exiting");
827 APLOGNO(00019)
"Unable to open logs, exiting");
833 APLOGNO(00020)
"Configuration Failed, exiting");
854 "MPM run failed, exiting");
862#ifdef AP_USING_AUTOCONF
Symbol export macros and hook functions.
Apache Multi-Processing Module library.
APR Miscellaneous library routines.
APR Command Arguments (getopt)
APR general purpose library routines.
APR Thread and Process Library.
APR Versioning Interface.
#define APR_VERSION_STRING
APR Standard Headers Support.
APR-util Versioning Interface.
#define APU_VERSION_STRING
static apr_pool_t * pconf
ap_directive_t * ap_conftree
void ap_register_hooks(module *m, apr_pool_t *p)
const char * ap_parse_log_level(const char *str, int *val)
apr_status_t ap_pool_cleanup_set_null(void *data)
const char * ap_setup_prelinked_modules(process_rec *process)
void ap_run_optional_fn_retrieve(void)
int ap_run_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
void ap_run_rewrite_args(process_rec *process)
void ap_show_directives(void)
void ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server)
int ap_process_config_tree(server_rec *s, ap_directive_t *conftree, apr_pool_t *p, apr_pool_t *ptemp)
int ap_run_open_logs(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
void ap_run_test_config(apr_pool_t *pconf, server_rec *s)
server_rec * ap_read_config(process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree)
int ap_run_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
int ap_run_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
const char * ap_show_mpm(void)
void ap_show_modules(void)
const char * ap_get_server_built(void)
#define DYNAMIC_MODULE_LIMIT
#define SERVER_CONFIG_FILE
const char * ap_get_server_description(void)
#define AP_TYPES_CONFIG_FILE
#define AP_SQ_RM_CONFIG_DUMP
#define AP_SQ_MS_CREATE_PRE_CONFIG
#define AP_SQ_MS_CREATE_CONFIG
#define AP_SQ_MS_DESTROY_CONFIG
#define AP_SQ_RM_CONFIG_TEST
apr_status_t ap_replace_stderr_log(apr_pool_t *p, const char *file)
void ap_open_stderr_log(apr_pool_t *p)
const char * ap_server_argv0
const char * ap_server_root
int ap_document_root_check
apr_array_header_t * ap_server_pre_read_config
apr_array_header_t * ap_server_config_defines
#define AP_SERVER_BASEARGS
apr_array_header_t * ap_server_post_read_config
server_rec * ap_server_conf
#define MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MINOR
int ap_run_mpm(apr_pool_t *pconf, apr_pool_t *plog, server_rec *server_conf)
void ap_clear_auth_internal(void)
int ap_signal_server(int *, apr_pool_t *)
apr_pool_t const char apr_dbd_t const char ** error
#define APR_RETRIEVE_OPTIONAL_FN(name)
#define APR_OPTIONAL_FN_TYPE(name)
void ap_init_rng(apr_pool_t *p)
#define apr_pool_lock(pool, lock)
void ap_abort_on_oom(void) __attribute__((noreturn))
apr_vformatter_buff_t * c
#define apr_pool_create(newpool, parent)
apr_status_t ap_mpm_query(int query_code, int *result)
#define AP_MPMQ_IS_FORKED
#define AP_MPMQ_IS_THREADED
static void usage(process_rec *process)
static int abort_on_oom(int retcode)
static void show_mpm_settings(void)
static void show_compile_settings(void)
static void destroy_and_exit_process(process_rec *process, int process_exit_value)
#define TASK_SWITCH_SLEEP
static process_rec * init_process(int *argc, const char *const **argv)
static apr_status_t deregister_all_hooks(void *unused)
static void reset_process_pconf(process_rec *process)
mod_core private header file
#define DEFAULT_SCOREBOARD
A structure that represents one process.
apr_status_t apr_ctime(char *date_str, apr_time_t t)
Utilities for EBCDIC conversion.
void ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s)