| | 63 | |
| | 64 | mod_parrot stores its configuration in its per-server configuration, which is defined as follows: |
| | 65 | |
| | 66 | {{{ |
| | 67 | struct modparrot_srv_config |
| | 68 | { |
| | 69 | apr_pool_t *pool; /* config APR pool */ |
| | 70 | apr_array_header_t *ctx_pool; /* context pool */ |
| | 71 | int start_interp; /* # of interps to start */ |
| | 72 | int minspare_interp; /* mininum spare interps */ |
| | 73 | int maxspare_interp; /* maximum spare interps */ |
| | 74 | int max_interp; /* maximum total interps */ |
| | 75 | char *init_path; /* path to mod_parrot.pbc */ |
| | 76 | int trace_flags; /* parrot trace flags */ |
| | 77 | int enable_option_flags; /* used during configuration */ |
| | 78 | int disable_option_flags; /* used during configuration */ |
| | 79 | int option_flags; /* OR'd option flags */ |
| | 80 | char *include_path; /* parrot library path */ |
| | 81 | apr_array_header_t *preload; /* modules to preload (ParrotLoad) */ |
| | 82 | apr_array_header_t *module_array; /* array of HLL module indices */ |
| | 83 | apr_hash_t *module_hash; /* maps HLL module names to module structs */ |
| | 84 | apr_array_header_t *handler_modules[MP_HOOK_LAST]; /* per-hook module registration */ |
| | 85 | }; |
| | 86 | typedef struct modparrot_srv_config modparrot_srv_config; |
| | 87 | }}} |
| | 88 | |
| | 89 | Server configurations for the main server and virtual servers are merged according to the following rules: |
| | 90 | |
| | 91 | * Options are merged first, as they can influence merging behavior. |
| | 92 | * For virtual servers with MP_OPT_PARENT: |
| | 93 | * Options are reset with defaults. No options are inherited from the main server. |
| | 94 | * The HLL module array and name map are inherited, as they are set during the main server config. |
| | 95 | * The library path is inherited unless one is specified. |
| | 96 | * Trace flags, init path, and preload array are not inherited. |
| | 97 | * For virtual servers without MO_OPT_PARENT: |
| | 98 | * Options are merged with with main server. Options explictly set in the virtual server config override the corresponding options from the main server , while options not explicitly set will inherit their values from the main server. |
| | 99 | * The HLL module array and name map are inherited, as they are set during the main server config. |
| | 100 | * The library path is inherited and cannot be overridden |
| | 101 | * Trace flags and the init path override their main server values (XXX init path should not be overridden here) |
| | 102 | * The preload array is concatenated with the main server preload array. |
| | 103 | |
| | 104 | mod_parrot has no section/directory configuration (HLL modules do, however). |