Configuration
[Core routines]

Collaboration diagram for Configuration:

Data Structures

union  cmd_func
struct  command_struct
struct  ap_configfile_t
struct  cmd_parms_struct
struct  module_struct
struct  ap_module_symbol_t
 This structure is used to assign symbol names to module pointers. More...

Modules

 Allowed locations for configuration directives.
 Module structure initializers
 Check command context
 Config Tree Package

Defines

#define AP_NO_ARGS   func.no_args
#define AP_RAW_ARGS   func.raw_args
#define AP_TAKE_ARGV   func.take_argv
#define AP_TAKE1   func.take1
#define AP_TAKE2   func.take2
#define AP_TAKE3   func.take3
#define AP_FLAG   func.flag
#define AP_INIT_NO_ARGS(directive, func, mconfig, where, help)   { directive, { .no_args=func }, mconfig, where, RAW_ARGS, help }
#define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help)   { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
#define AP_INIT_TAKE_ARGV(directive, func, mconfig, where, help)   { directive, { .take_argv=func }, mconfig, where, TAKE_ARGV, help }
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)   { directive, { .take1=func }, mconfig, where, TAKE1, help }
#define AP_INIT_ITERATE(directive, func, mconfig, where, help)   { directive, { .take1=func }, mconfig, where, ITERATE, help }
#define AP_INIT_TAKE2(directive, func, mconfig, where, help)   { directive, { .take2=func }, mconfig, where, TAKE2, help }
#define AP_INIT_TAKE12(directive, func, mconfig, where, help)   { directive, { .take2=func }, mconfig, where, TAKE12, help }
#define AP_INIT_ITERATE2(directive, func, mconfig, where, help)   { directive, { .take2=func }, mconfig, where, ITERATE2, help }
#define AP_INIT_TAKE13(directive, func, mconfig, where, help)   { directive, { .take3=func }, mconfig, where, TAKE13, help }
#define AP_INIT_TAKE23(directive, func, mconfig, where, help)   { directive, { .take3=func }, mconfig, where, TAKE23, help }
#define AP_INIT_TAKE123(directive, func, mconfig, where, help)   { directive, { .take3=func }, mconfig, where, TAKE123, help }
#define AP_INIT_TAKE3(directive, func, mconfig, where, help)   { directive, { .take3=func }, mconfig, where, TAKE3, help }
#define AP_INIT_FLAG(directive, func, mconfig, where, help)   { directive, { .flag=func }, mconfig, where, FLAG, help }
#define DECLINE_CMD   "\a\b"
#define APLOG_USE_MODULE(foo)
#define AP_DECLARE_MODULE(foo)
#define ap_get_module_config(v, m)   (((void **)(v))[(m)->module_index])
#define ap_set_module_config(v, m, val)   ((((void **)(v))[(m)->module_index]) = (val))
#define ap_get_conn_logconf(c)
#define ap_get_conn_server_logconf(c, s)
#define ap_get_request_logconf(r)
#define ap_get_module_loglevel(l, i)
#define ap_get_server_module_loglevel(s, i)   (ap_get_module_loglevel(&(s)->log,i))
#define ap_get_conn_module_loglevel(c, i)   (ap_get_module_loglevel(ap_get_conn_logconf(c),i))
#define ap_get_conn_server_module_loglevel(c, s, i)   (ap_get_module_loglevel(ap_get_conn_server_logconf(c,s),i))
#define ap_get_request_module_loglevel(r, i)   (ap_get_module_loglevel(ap_get_request_logconf(r),i))

Typedefs

typedef struct cmd_parms_struct cmd_parms
typedef struct command_struct command_rec
typedef struct ap_configfile_t ap_configfile_t
typedef struct module_struct module
typedef struct ap_conf_vector_t ap_conf_vector_t

Enumerations

enum  cmd_how {
  RAW_ARGS, TAKE1, TAKE2, ITERATE,
  ITERATE2, FLAG, NO_ARGS, TAKE12,
  TAKE3, TAKE23, TAKE123, TAKE13,
  TAKE_ARGV
}

Functions

void * ap_get_module_config (const ap_conf_vector_t *cv, const module *m)
void ap_set_module_config (ap_conf_vector_t *cv, const module *m, void *val)
int ap_get_server_module_loglevel (const server_rec *s, int index)
int ap_get_conn_module_loglevel (const conn_rec *c, int index)
int ap_get_conn_server_module_loglevel (const conn_rec *c, const server_rec *s, int index)
int ap_get_request_module_loglevel (const request_rec *r, int index)
void ap_set_module_loglevel (apr_pool_t *p, struct ap_logconf *l, int index, int level)
void ap_reset_module_loglevels (struct ap_logconf *l, int val)
const char * ap_set_string_slot (cmd_parms *cmd, void *struct_ptr, const char *arg)
const char * ap_set_int_slot (cmd_parms *cmd, void *struct_ptr, const char *arg)
const char * ap_parse_log_level (const char *str, int *val)
int ap_method_is_limited (cmd_parms *cmd, const char *method)
const char * ap_set_string_slot_lower (cmd_parms *cmd, void *struct_ptr, const char *arg)
const char * ap_set_flag_slot (cmd_parms *cmd, void *struct_ptr, int arg)
const char * ap_set_flag_slot_char (cmd_parms *cmd, void *struct_ptr, int arg)
const char * ap_set_file_slot (cmd_parms *cmd, void *struct_ptr, const char *arg)
const char * ap_set_deprecated (cmd_parms *cmd, void *struct_ptr, const char *arg)
char * ap_server_root_relative (apr_pool_t *p, const char *fname)
char * ap_runtime_dir_relative (apr_pool_t *p, const char *fname)
const char * ap_add_module (module *m, apr_pool_t *p, const char *s)
void ap_remove_module (module *m)
const char * ap_add_loaded_module (module *mod, apr_pool_t *p, const char *s)
void ap_remove_loaded_module (module *mod)
const char * ap_find_module_name (module *m)
const char * ap_find_module_short_name (int module_index)
moduleap_find_linked_module (const char *name)
apr_status_t ap_pcfg_openfile (ap_configfile_t **ret_cfg, apr_pool_t *p, const char *name)
ap_configfile_tap_pcfg_open_custom (apr_pool_t *p, const char *descr, void *param, apr_status_t(*getc_func)(char *ch, void *param), apr_status_t(*gets_func)(void *buf, apr_size_t bufsiz, void *param), apr_status_t(*close_func)(void *param))
apr_status_t ap_cfg_getline (char *buf, apr_size_t bufsize, ap_configfile_t *cfp)
apr_status_t ap_cfg_getc (char *ch, ap_configfile_t *cfp)
int ap_cfg_closefile (ap_configfile_t *cfp)
const char * ap_pcfg_strerror (apr_pool_t *p, ap_configfile_t *cfp, apr_status_t rc)
const char * ap_soak_end_container (cmd_parms *cmd, char *directive)
const char * ap_build_cont_config (apr_pool_t *p, apr_pool_t *temp_pool, cmd_parms *parms, ap_directive_t **current, ap_directive_t **curr_parent, char *orig_directive)
const char * ap_build_config (cmd_parms *parms, apr_pool_t *conf_pool, apr_pool_t *temp_pool, ap_directive_t **conftree)
const char * ap_walk_config (ap_directive_t *conftree, cmd_parms *parms, ap_conf_vector_t *section_vector)
void ap_single_module_configure (apr_pool_t *p, server_rec *s, module *m)
const char * ap_setup_prelinked_modules (process_rec *process)
void ap_show_directives (void)
void ap_show_modules (void)
const char * ap_show_mpm (void)
server_recap_read_config (process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree)
void ap_run_rewrite_args (process_rec *process)
void ap_register_hooks (module *m, apr_pool_t *p)
void ap_fixup_virtual_hosts (apr_pool_t *p, server_rec *main_server)
void ap_reserve_module_slots (int count)
void ap_reserve_module_slots_directive (const char *directive)
ap_conf_vector_tap_create_request_config (apr_pool_t *p)
ap_conf_vector_tap_create_per_dir_config (apr_pool_t *p)
ap_conf_vector_tap_merge_per_dir_configs (apr_pool_t *p, ap_conf_vector_t *base, ap_conf_vector_t *new_conf)
struct ap_logconfap_new_log_config (apr_pool_t *p, const struct ap_logconf *old)
void ap_merge_log_config (const struct ap_logconf *old_conf, struct ap_logconf *new_conf)
ap_conf_vector_tap_create_conn_config (apr_pool_t *p)
int ap_parse_htaccess (ap_conf_vector_t **result, request_rec *r, int override, int override_opts, apr_table_t *override_list, const char *path, const char *access_name)
const char * ap_init_virtual_host (apr_pool_t *p, const char *hostname, server_rec *main_server, server_rec **ps)
const char * ap_process_resource_config (server_rec *s, const char *fname, ap_directive_t **conftree, apr_pool_t *p, apr_pool_t *ptemp)
const char * ap_process_fnmatch_configs (server_rec *s, const char *fname, ap_directive_t **conftree, apr_pool_t *p, apr_pool_t *ptemp, int optional)
int ap_process_config_tree (server_rec *s, ap_directive_t *conftree, apr_pool_t *p, apr_pool_t *ptemp)
void * ap_retained_data_create (const char *key, apr_size_t size)
void * ap_retained_data_get (const char *key)
int ap_invoke_handler (request_rec *r)
const command_recap_find_command (const char *name, const command_rec *cmds)
const command_recap_find_command_in_modules (const char *cmd_name, module **mod)
void * ap_set_config_vectors (server_rec *server, ap_conf_vector_t *section_vector, const char *section, module *mod, apr_pool_t *pconf)
apr_status_t ap_open_htaccess (request_rec *r, const char *dir_name, const char *access_name, ap_configfile_t **conffile, const char **full_name)
apr_status_t ap_pool_cleanup_set_null (void *data)

Variables

AP_DECLARE_DATA moduleap_top_module
AP_DECLARE_DATA moduleap_prelinked_modules []
AP_DECLARE_DATA ap_module_symbol_t ap_prelinked_module_symbols []
AP_DECLARE_DATA moduleap_preloaded_modules []
AP_DECLARE_DATA module ** ap_loaded_modules

Define Documentation

#define AP_DECLARE_MODULE ( foo   ) 
Value:

AP_DECLARE_MODULE is a convenience macro that combines a call of APLOG_USE_MODULE with the definition of the module symbol.

If a module should be backward compatible with versions before 2.3.6, APLOG_USE_MODULE should be used explicitly instead of AP_DECLARE_MODULE.

#define AP_FLAG   func.flag

This configuration directive takes a flag (on/off) as a argument

#define ap_get_conn_logconf (  ) 
Value:
((c)->log             ? (c)->log             : \
     &(c)->base_server->log)
#define ap_get_conn_module_loglevel ( c,
 )     (ap_get_module_loglevel(ap_get_conn_logconf(c),i))
#define ap_get_conn_server_logconf ( c,
 ) 
Value:
( ( (c)->log != &(c)->base_server->log && (c)->log != NULL )  ? \
      (c)->log                                                    : \
      &(s)->log )
#define ap_get_conn_server_module_loglevel ( c,
s,
 )     (ap_get_module_loglevel(ap_get_conn_server_logconf(c,s),i))
#define ap_get_module_config ( v,
 )     (((void **)(v))[(m)->module_index])
#define ap_get_module_loglevel ( l,
 ) 
Value:
(((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
     (l)->level :                                                         \
     (l)->module_levels[i])
#define ap_get_request_logconf ( r   ) 
Value:
((r)->log             ? (r)->log             : \
     (r)->connection->log ? (r)->connection->log : \
     &(r)->server->log)
#define ap_get_request_module_loglevel ( r,
 )     (ap_get_module_loglevel(ap_get_request_logconf(r),i))
#define ap_get_server_module_loglevel ( s,
 )     (ap_get_module_loglevel(&(s)->log,i))
#define AP_INIT_FLAG ( directive,
func,
mconfig,
where,
help   )     { directive, { .flag=func }, mconfig, where, FLAG, help }

mechanism for declaring a directive which takes a flag (on/off) argument

#define AP_INIT_ITERATE ( directive,
func,
mconfig,
where,
help   )     { directive, { .take1=func }, mconfig, where, ITERATE, help }

mechanism for declaring a directive which takes multiple arguments

#define AP_INIT_ITERATE2 ( directive,
func,
mconfig,
where,
help   )     { directive, { .take2=func }, mconfig, where, ITERATE2, help }

mechanism for declaring a directive which takes multiple 2 arguments

#define AP_INIT_NO_ARGS ( directive,
func,
mconfig,
where,
help   )     { directive, { .no_args=func }, mconfig, where, RAW_ARGS, help }

mechanism for declaring a directive with no arguments

#define AP_INIT_RAW_ARGS ( directive,
func,
mconfig,
where,
help   )     { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }

mechanism for declaring a directive with raw argument parsing

#define AP_INIT_TAKE1 ( directive,
func,
mconfig,
where,
help   )     { directive, { .take1=func }, mconfig, where, TAKE1, help }

mechanism for declaring a directive which takes 1 argument

#define AP_INIT_TAKE12 ( directive,
func,
mconfig,
where,
help   )     { directive, { .take2=func }, mconfig, where, TAKE12, help }

mechanism for declaring a directive which takes 1 or 2 arguments

#define AP_INIT_TAKE123 ( directive,
func,
mconfig,
where,
help   )     { directive, { .take3=func }, mconfig, where, TAKE123, help }

mechanism for declaring a directive which takes 1 to 3 arguments

#define AP_INIT_TAKE13 ( directive,
func,
mconfig,
where,
help   )     { directive, { .take3=func }, mconfig, where, TAKE13, help }

mechanism for declaring a directive which takes 1 or 3 arguments

#define AP_INIT_TAKE2 ( directive,
func,
mconfig,
where,
help   )     { directive, { .take2=func }, mconfig, where, TAKE2, help }

mechanism for declaring a directive which takes 2 arguments

#define AP_INIT_TAKE23 ( directive,
func,
mconfig,
where,
help   )     { directive, { .take3=func }, mconfig, where, TAKE23, help }

mechanism for declaring a directive which takes 2 or 3 arguments

#define AP_INIT_TAKE3 ( directive,
func,
mconfig,
where,
help   )     { directive, { .take3=func }, mconfig, where, TAKE3, help }

mechanism for declaring a directive which takes 3 arguments

#define AP_INIT_TAKE_ARGV ( directive,
func,
mconfig,
where,
help   )     { directive, { .take_argv=func }, mconfig, where, TAKE_ARGV, help }

mechanism for declaring a directive with raw argument parsing

#define AP_NO_ARGS   func.no_args

This configuration directive does not take any arguments

#define AP_RAW_ARGS   func.raw_args

This configuration directive will handle its own parsing of arguments

#define ap_set_module_config ( v,
m,
val   )     ((((void **)(v))[(m)->module_index]) = (val))
#define AP_TAKE1   func.take1

This configuration directive takes 1 argument

#define AP_TAKE2   func.take2

This configuration directive takes 2 arguments

#define AP_TAKE3   func.take3

This configuration directive takes 3 arguments

#define AP_TAKE_ARGV   func.take_argv

This configuration directive will handle its own parsing of arguments

#define APLOG_USE_MODULE ( foo   ) 
Value:
extern module AP_MODULE_DECLARE_DATA foo##_module;                  \
    static int * const aplog_module_index = &(foo##_module.module_index)

The APLOG_USE_MODULE macro is used choose which module a file belongs to. This is necessary to allow per-module loglevel configuration.

APLOG_USE_MODULE indirectly sets APLOG_MODULE_INDEX and APLOG_MARK.

If a module should be backward compatible with versions before 2.3.6, APLOG_USE_MODULE needs to be enclosed in a ifdef APLOG_USE_MODULE block.

Parameters:
foo name of the module symbol of the current module, without the trailing "_module" part
See also:
APLOG_MARK
#define DECLINE_CMD   "\a\b"

This can be returned by a function if they don't wish to handle a command. Make it something not likely someone will actually use as an error code.


Typedef Documentation

configuration vector structure

Common structure for reading of config files / passwd files etc.

typedef struct cmd_parms_struct cmd_parms

This structure is passed to a command which is being invoked, to carry a large variety of miscellaneous data which is all of use to *somebody*...

typedef struct command_struct command_rec

The command record structure. Modules can define a table of these to define the directives it will implement.

typedef struct module_struct module

Module structures. Just about everything is dispatched through these, directly or indirectly (through the command and handler tables).


Enumeration Type Documentation

enum cmd_how

How the directives arguments should be parsed.

Remarks:
Note that for all of these except RAW_ARGS, the config routine is passed a freshly allocated string which can be modified or stored or whatever...
Enumerator:
RAW_ARGS 

cmd_func parses command line itself

TAKE1 

one argument only

TAKE2 

two arguments only

ITERATE 

one argument, occuring multiple times (e.g., IndexIgnore)

ITERATE2 

two arguments, 2nd occurs multiple times (e.g., AddIcon)

FLAG 

One of 'On' or 'Off'

NO_ARGS 

No args at all, e.g. </Directory>

TAKE12 

one or two arguments

TAKE3 

three arguments only

TAKE23 

two or three arguments

TAKE123 

one, two or three arguments

TAKE13 

one or three arguments

TAKE_ARGV 

an argc and argv are passed


Function Documentation

const char* ap_add_loaded_module ( module mod,
apr_pool_t p,
const char *  s 
)

Add a module to the chained modules list and the list of loaded modules

Parameters:
mod The module structure of the module to add
p The pool with the same lifetime as the module
s The module's symbol name (used for logging)
const char* ap_add_module ( module m,
apr_pool_t p,
const char *  s 
)

Add a module to the server

Parameters:
m The module structure of the module to add
p The pool of the same lifetime as the module
s The module's symbol name (used for logging)
const char* ap_build_config ( cmd_parms parms,
apr_pool_t conf_pool,
apr_pool_t temp_pool,
ap_directive_t **  conftree 
)

Build a config tree from a config file

Parameters:
parms The cmd_parms to pass to all of the directives in the file
conf_pool The pconf pool
temp_pool The temporary pool
conftree Place to store the root node of the config tree
Returns:
Error string on erro, NULL otherwise
Note:
If conf_pool == temp_pool, ap_build_config() will assume .htaccess context and use a lower maximum line length.
const char* ap_build_cont_config ( apr_pool_t p,
apr_pool_t temp_pool,
cmd_parms parms,
ap_directive_t **  current,
ap_directive_t **  curr_parent,
char *  orig_directive 
)

Read all data between the current <foo> and the matching </foo> and build a config tree from it

Parameters:
p pool to allocate from
temp_pool Temporary pool to allocate from
parms The cmd_parms to pass to all directives read
current The current node in the tree
curr_parent The current parent node
orig_directive The directive to read until hit.
Returns:
Error string on failure, NULL on success
Note:
If p == temp_pool, ap_build_cont_config() will assume .htaccess context and use a lower maximum line length.
int ap_cfg_closefile ( ap_configfile_t cfp  ) 

Detach from open ap_configfile_t, calling the close handler

Parameters:
cfp The file to close
Returns:
1 on sucess, 0 on failure
apr_status_t ap_cfg_getc ( char *  ch,
ap_configfile_t cfp 
)

Read one char from open configfile_t, increase line number upon LF

Parameters:
ch place to store the char read
cfp The file to read from
Returns:
error status
apr_status_t ap_cfg_getline ( char *  buf,
apr_size_t  bufsize,
ap_configfile_t cfp 
)

Read one line from open ap_configfile_t, strip leading and trailing whitespace, increase line number

Parameters:
buf place to store the line read
bufsize size of the buffer
cfp File to read from
Returns:
error status, APR_ENOSPC if bufsize is too small for the line
ap_conf_vector_t* ap_create_conn_config ( apr_pool_t p  ) 

Setup the config vector for a connection_rec

Parameters:
p The pool to allocate the config vector from
Returns:
The config vector
ap_conf_vector_t* ap_create_per_dir_config ( apr_pool_t p  ) 

Setup the config vector for per dir module configs

Parameters:
p The pool to allocate the config vector from
Returns:
The config vector
ap_conf_vector_t* ap_create_request_config ( apr_pool_t p  ) 

Setup the config vector for a request_rec

Parameters:
p The pool to allocate the config vector from
Returns:
The config vector
const command_rec* ap_find_command ( const char *  name,
const command_rec cmds 
)

Find a given directive in a command_rec table

Parameters:
name The directive to search for
cmds The table to search
Returns:
The directive definition of the specified directive
const command_rec* ap_find_command_in_modules ( const char *  cmd_name,
module **  mod 
)

Find a given directive in a list of modules.

Parameters:
cmd_name The directive to search for
mod Pointer to the first module in the linked list; will be set to the module providing cmd_name
Returns:
The directive definition of the specified directive. *mod will be changed to point to the module containing the directive.
module* ap_find_linked_module ( const char *  name  ) 

Find a module based on the name of the module

Parameters:
name the name of the module
Returns:
the module structure if found, NULL otherwise
const char* ap_find_module_name ( module m  ) 

Find the name of the specified module

Parameters:
m The module to get the name for
Returns:
the name of the module
const char* ap_find_module_short_name ( int  module_index  ) 

Find the short name of the module identified by the specified module index

Parameters:
module_index The module index to get the name for
Returns:
the name of the module, NULL if not found
void ap_fixup_virtual_hosts ( apr_pool_t p,
server_rec main_server 
)

Setup all virtual hosts

Parameters:
p The pool to allocate from
main_server The head of the server_rec list
int ap_get_conn_module_loglevel ( const conn_rec c,
int  index 
)

Generic accessor for modules the module-specific loglevel

Parameters:
c The connection from which to get the loglevel.
index The module_index of the module to get the loglevel for.
Returns:
The module-specific loglevel
int ap_get_conn_server_module_loglevel ( const conn_rec c,
const server_rec s,
int  index 
)

Generic accessor for modules the module-specific loglevel

Parameters:
c The connection from which to get the loglevel.
s The server from which to get the loglevel if c does not have a specific loglevel configuration.
index The module_index of the module to get the loglevel for.
Returns:
The module-specific loglevel
void* ap_get_module_config ( const ap_conf_vector_t cv,
const module m 
)

Generic accessors for other modules to get at their own module-specific data

Parameters:
cv The vector in which the modules configuration is stored. usually r->per_dir_config or s->module_config
m The module to get the data for.
Returns:
The module-specific data
int ap_get_request_module_loglevel ( const request_rec r,
int  index 
)

Generic accessor for modules to get the module-specific loglevel

Parameters:
r The request from which to get the loglevel.
index The module_index of the module to get the loglevel for.
Returns:
The module-specific loglevel
int ap_get_server_module_loglevel ( const server_rec s,
int  index 
)

Generic accessor for modules to get the module-specific loglevel

Parameters:
s The server from which to get the loglevel.
index The module_index of the module to get the loglevel for.
Returns:
The module-specific loglevel
const char* ap_init_virtual_host ( apr_pool_t p,
const char *  hostname,
server_rec main_server,
server_rec **  ps 
)

Setup a virtual host

Parameters:
p The pool to allocate all memory from
hostname The hostname of the virtual hsot
main_server The main server for this Apache configuration
ps Place to store the new server_rec return Error string on error, NULL on success
int ap_invoke_handler ( request_rec r  ) 

Run the handler phase of each module until a module accepts the responsibility of serving the request

Parameters:
r The current request
Returns:
The status of the current request
void ap_merge_log_config ( const struct ap_logconf old_conf,
struct ap_logconf new_conf 
)

Merge old ap_logconf into new ap_logconf. old and new must have the same life time.

Parameters:
old_conf The ap_logconf to merge from
new_conf The ap_logconf to merge into
ap_conf_vector_t* ap_merge_per_dir_configs ( apr_pool_t p,
ap_conf_vector_t base,
ap_conf_vector_t new_conf 
)

Run all of the modules merge per dir config functions

Parameters:
p The pool to pass to the merge functions
base The base directory config structure
new_conf The new directory config structure
int ap_method_is_limited ( cmd_parms cmd,
const char *  method 
)

Return true if the specified method is limited by being listed in a <Limit> container, or by *not* being listed in a <LimitExcept> container.

Parameters:
method Pointer to a string specifying the method to check.
cmd Pointer to the cmd_parms structure passed to the directive handler.
Returns:
0 if the method is not limited in the current scope
struct ap_logconf* ap_new_log_config ( apr_pool_t p,
const struct ap_logconf old 
) [read]

Allocate new ap_logconf and make (deep) copy of old ap_logconf

Parameters:
p The pool to alloc from
old The ap_logconf to copy (may be NULL)
Returns:
The new ap_logconf struct
apr_status_t ap_open_htaccess ( request_rec r,
const char *  dir_name,
const char *  access_name,
ap_configfile_t **  conffile,
const char **  full_name 
)

Core internal function, use ap_run_open_htaccess() instead.

int ap_parse_htaccess ( ap_conf_vector_t **  result,
request_rec r,
int  override,
int  override_opts,
apr_table_t override_list,
const char *  path,
const char *  access_name 
)

parse an htaccess file

Parameters:
result htaccess_result
r The request currently being served
override Which overrides are active
override_opts Which allow-override-opts bits are set
override_list Table of directives allowed for override
path The path to the htaccess file
access_name The list of possible names for .htaccess files int The status of the current request
const char* ap_parse_log_level ( const char *  str,
int *  val 
)

Parsing function for log level

Parameters:
str The string to parse
val The parsed log level
Returns:
An error string or NULL on success
ap_configfile_t* ap_pcfg_open_custom ( apr_pool_t p,
const char *  descr,
void *  param,
apr_status_t(*)(char *ch, void *param)  getc_func,
apr_status_t(*)(void *buf, apr_size_t bufsiz, void *param)  gets_func,
apr_status_t(*)(void *param)  close_func 
)

Allocate a ap_configfile_t handle with user defined functions and params

Parameters:
p The pool to allocate from
descr The name of the file
param The argument passed to getch/getstr/close
getc_func The getch function
gets_func The getstr function
close_func The close function
apr_status_t ap_pcfg_openfile ( ap_configfile_t **  ret_cfg,
apr_pool_t p,
const char *  name 
)

Open a ap_configfile_t as apr_file_t

Parameters:
ret_cfg open ap_configfile_t struct pointer
p The pool to allocate the structure from
name the name of the file to open
const char* ap_pcfg_strerror ( apr_pool_t p,
ap_configfile_t cfp,
apr_status_t  rc 
)

Convert a return value from ap_cfg_getline or ap_cfg_getc to a user friendly string.

Parameters:
p The pool to allocate the string from
cfp The config file
rc The return value to convert
Returns:
The error string, NULL if rc == APR_SUCCESS
apr_status_t ap_pool_cleanup_set_null ( void *  data  ) 

A generic pool cleanup that will reset a pointer to NULL. For use with apr_pool_cleanup_register.

Parameters:
data The address of the pointer
Returns:
APR_SUCCESS
int ap_process_config_tree ( server_rec s,
ap_directive_t conftree,
apr_pool_t p,
apr_pool_t ptemp 
)

Process all directives in the config tree

Parameters:
s The server rec to use in the command parms
conftree The config tree to process
p The pool for general allocation
ptemp The pool for temporary allocations
Returns:
OK if no problems
const char* ap_process_fnmatch_configs ( server_rec s,
const char *  fname,
ap_directive_t **  conftree,
apr_pool_t p,
apr_pool_t ptemp,
int  optional 
)

Process all matching files as Apache configs

Parameters:
s The server rec to use for the command parms
fname The filename pattern of the config file
conftree The root node of the created config tree
p Pool for general allocation
ptemp Pool for temporary allocation
optional Whether a no-match wildcard is allowed
See also:
apr_fnmatch for pattern handling
const char* ap_process_resource_config ( server_rec s,
const char *  fname,
ap_directive_t **  conftree,
apr_pool_t p,
apr_pool_t ptemp 
)

Process a config file for Apache

Parameters:
s The server rec to use for the command parms
fname The name of the config file
conftree The root node of the created config tree
p Pool for general allocation
ptemp Pool for temporary allocation
server_rec* ap_read_config ( process_rec process,
apr_pool_t temp_pool,
const char *  config_name,
ap_directive_t **  conftree 
)

Read all config files and setup the server

Parameters:
process The process running the server
temp_pool A pool to allocate temporary data from.
config_name The name of the config file
conftree Place to store the root of the config tree
Returns:
The setup server_rec list.
void ap_register_hooks ( module m,
apr_pool_t p 
)

Run the register hooks function for a specified module

Parameters:
m The module to run the register hooks function fo
p The pool valid for the lifetime of the module
void ap_remove_loaded_module ( module mod  ) 

Remove a module fromthe chained modules list and the list of loaded modules

Parameters:
mod the module structure of the module to remove
void ap_remove_module ( module m  ) 

Remove a module from the server. There are some caveats: when the module is removed, its slot is lost so all the current per-dir and per-server configurations are invalid. So we should only ever call this function when you are invalidating almost all our current data. I.e. when doing a restart.

Parameters:
m the module structure of the module to remove
void ap_reserve_module_slots ( int  count  ) 

Reserve some modules slots for modules loaded by other means than EXEC_ON_READ directives. Relevant modules should call this in the pre_config stage.

Parameters:
count The number of slots to reserve.
void ap_reserve_module_slots_directive ( const char *  directive  ) 

Reserve some modules slots for modules loaded by a specific non-EXEC_ON_READ config directive. This counts how often the given directive is used in the config and calls ap_reserve_module_slots() accordingly.

Parameters:
directive The name of the directive
void ap_reset_module_loglevels ( struct ap_logconf l,
int  val 
)

Set all module-specific loglevels to val

Parameters:
l The log config for which to set the loglevels.
val the value to set all loglevels to
void* ap_retained_data_create ( const char *  key,
apr_size_t  size 
)

Store data which will be retained across unload/load of modules

Parameters:
key The unique key associated with this module's retained data
size in bytes of the retained data (to be allocated)
Returns:
Address of new retained data structure, initially cleared
void* ap_retained_data_get ( const char *  key  ) 

Retrieve data which was stored by ap_retained_data_create()

Parameters:
key The unique key associated with this module's retained data
Returns:
Address of previously retained data structure, or NULL if not yet saved
void ap_run_rewrite_args ( process_rec process  ) 

Run all rewrite args hooks for loaded modules

Parameters:
process The process currently running the server
char* ap_runtime_dir_relative ( apr_pool_t p,
const char *  fname 
)

Compute the name of a run-time file (e.g., shared memory "file") relative to the appropriate run-time directory. Absolute paths are returned as-is. The run-time directory is configured via the DefaultRuntimeDir directive or at build time.

char* ap_server_root_relative ( apr_pool_t p,
const char *  fname 
)

For modules which need to read config files, open logs, etc. this returns the canonical form of fname made absolute to ap_server_root.

Parameters:
p pool to allocate data from
fname The file name
void* ap_set_config_vectors ( server_rec server,
ap_conf_vector_t section_vector,
const char *  section,
module mod,
apr_pool_t pconf 
)

Ask a module to create per-server and per-section (dir/loc/file) configs (if it hasn't happened already). The results are stored in the server's config, and the specified per-section config vector.

Parameters:
server The server to operate upon.
section_vector The per-section config vector.
section Which section to create a config for.
mod The module which is defining the config data.
pconf A pool for all configuration allocations.
Returns:
The (new) per-section config data.
const char* ap_set_deprecated ( cmd_parms cmd,
void *  struct_ptr,
const char *  arg 
)

Generic command handling function to respond with cmd->help as an error

Parameters:
cmd The command parameters for this directive
struct_ptr pointer into a given type
arg The argument to the directive
Returns:
The cmd->help value as the error string
Note:
This allows simple declarations such as:
     AP_INIT_RAW_ARGS("Foo", ap_set_deprecated, NULL, OR_ALL,
         "The Foo directive is no longer supported, use Bar"),
const char* ap_set_file_slot ( cmd_parms cmd,
void *  struct_ptr,
const char *  arg 
)

Generic command handling function for files

Parameters:
cmd The command parameters for this directive
struct_ptr pointer into a given type
arg The argument to the directive
Returns:
An error string or NULL on success
const char* ap_set_flag_slot ( cmd_parms cmd,
void *  struct_ptr,
int  arg 
)

Generic command handling function for flags stored in an int

Parameters:
cmd The command parameters for this directive
struct_ptr pointer into a given type
arg The argument to the directive (either 1 or 0)
Returns:
An error string or NULL on success
const char* ap_set_flag_slot_char ( cmd_parms cmd,
void *  struct_ptr,
int  arg 
)

Generic command handling function for flags stored in a char

Parameters:
cmd The command parameters for this directive
struct_ptr pointer into a given type
arg The argument to the directive (either 1 or 0)
Returns:
An error string or NULL on success
const char* ap_set_int_slot ( cmd_parms cmd,
void *  struct_ptr,
const char *  arg 
)

Generic command handling function for integers

Parameters:
cmd The command parameters for this directive
struct_ptr pointer into a given type
arg The argument to the directive
Returns:
An error string or NULL on success
void ap_set_module_config ( ap_conf_vector_t cv,
const module m,
void *  val 
)

Generic accessors for other modules to set their own module-specific data

Parameters:
cv The vector in which the modules configuration is stored. usually r->per_dir_config or s->module_config
m The module to set the data for.
val The module-specific data to set
void ap_set_module_loglevel ( apr_pool_t p,
struct ap_logconf l,
int  index,
int  level 
)

Accessor to set module-specific loglevel

Parameters:
p A pool
l The ap_logconf struct to modify.
index The module_index of the module to set the loglevel for.
level The new log level
const char* ap_set_string_slot ( cmd_parms cmd,
void *  struct_ptr,
const char *  arg 
)

Generic command handling function for strings

Parameters:
cmd The command parameters for this directive
struct_ptr pointer into a given type
arg The argument to the directive
Returns:
An error string or NULL on success
const char* ap_set_string_slot_lower ( cmd_parms cmd,
void *  struct_ptr,
const char *  arg 
)

Generic command handling function for strings, always sets the value to a lowercase string

Parameters:
cmd The command parameters for this directive
struct_ptr pointer into a given type
arg The argument to the directive
Returns:
An error string or NULL on success
const char* ap_setup_prelinked_modules ( process_rec process  ) 

Add all of the prelinked modules into the loaded module list

Parameters:
process The process that is currently running the server
void ap_show_directives ( void   ) 

Show the preloaded configuration directives, the help string explaining the directive arguments, in what module they are handled, and in what parts of the configuration they are allowed. Used for httpd -h.

void ap_show_modules ( void   ) 

Show the preloaded module names. Used for httpd -l.

const char* ap_show_mpm ( void   ) 

Show the MPM name. Used in reporting modules such as mod_info to provide extra information to the user

void ap_single_module_configure ( apr_pool_t p,
server_rec s,
module m 
)

Run a single module's two create_config hooks

Parameters:
p the pool to allocate from
s The server to configure for.
m The module to configure
const char* ap_soak_end_container ( cmd_parms cmd,
char *  directive 
)

Read all data between the current <foo> and the matching </foo>. All of this data is forgotten immediately.

Parameters:
cmd The cmd_parms to pass to the directives inside the container
directive The directive name to read until
Returns:
Error string on failure, NULL on success
Note:
If cmd->pool == cmd->temp_pool, ap_soak_end_container() will assume .htaccess context and use a lower maximum line length.
const char* ap_walk_config ( ap_directive_t conftree,
cmd_parms parms,
ap_conf_vector_t section_vector 
)

Walk a config tree and setup the server's internal structures

Parameters:
conftree The config tree to walk
parms The cmd_parms to pass to all functions
section_vector The per-section config vector.
Returns:
Error string on error, NULL otherwise

Variable Documentation

Array of all loaded modules

Array of all statically linked modulenames (symbols)

Array of all statically linked modules

Array of all preloaded modules

The topmost module in the list

Generated on Sun Nov 23 14:02:37 2014 for Apache2 by  doxygen 1.6.3