Apache Web server 1.3 API Dictionary

The intent of this and the related pages is to provide definitive documentation for the Apache Web server API (application programming interface) for version 1.3. Unfortunately, it does not yet live up to that intention, but it's something, anyway. This file is under construction.

Table of Contents


Routine Descriptions


  1. ap_acquire_mutex
  2. ap_add_cgi_vars
  3. ap_add_common_vars
  4. ap_add_loaded_module
  5. ap_add_module
  6. ap_add_named_module
  7. ap_add_per_dir_conf
  8. ap_add_per_url_conf
  9. ap_add_version_component
  10. ap_allow_options
  11. ap_allow_overrides
  12. ap_append_arrays
  13. ap_array_cat
  14. ap_array_pstrcat
  15. ap_auth_name
  16. ap_auth_type
  17. ap_base64decode
  18. ap_base64decode_binary
  19. ap_base64decode_len
  20. ap_base64encode
  21. ap_base64encode_binary
  22. ap_base64encode_len
  23. ap_basic_http_header
  24. ap_bclose
  25. ap_bcreate
  26. ap_bfilbuf
  27. ap_bfileno
  28. ap_bflsbuf
  29. ap_bflush
  30. ap_bgetc
  31. ap_bgetflag
  32. ap_bgetopt
  33. ap_bgets
  34. ap_bhalfduplex
  35. ap_block_alarms
  36. ap_blookc
  37. ap_bnonblock
  38. ap_bonerror
  39. ap_bprintf
  40. ap_bpushfd
  41. ap_bpushh
  42. ap_bputc
  43. ap_bputs
  44. ap_bread
  45. ap_bsetflag
  46. ap_bsetopt
  47. ap_bskiplf
  48. ap_bspawn_child
  49. ap_bvputs
  50. ap_bwrite
  51. ap_bytes_in_free_blocks
  52. ap_bytes_in_pool
  53. ap_call_exec
  54. ap_can_exec
  55. ap_cfg_closefile
  56. ap_cfg_getc
  57. ap_cfg_getline
  58. ap_chdir_file
  59. ap_checkmask
  60. ap_check_access
  61. ap_check_alarm
  62. ap_check_auth
  63. ap_check_cmd_context
  64. ap_check_user_id
  65. ap_child_exit_modules
  66. ap_child_init_modules
  67. ap_child_terminate
  68. ap_cleanup_for_exec
  69. ap_clear_module_list
  70. ap_clear_pool
  71. ap_clear_table
  72. ap_close_piped_log
  73. ap_construct_server
  74. ap_construct_url
  75. ap_content_type_tolower
  76. ap_copy_array
  77. ap_copy_array_hdr
  78. ap_copy_table
  79. ap_core_reorder_directories
  80. ap_count_dirs
  81. ap_cpystrn
  82. ap_create_environment
  83. ap_create_mutex
  84. ap_create_per_dir_config
  85. ap_create_request_config
  86. ap_custom_response
  87. ap_default_port_for_request
  88. ap_default_port_for_scheme
  89. ap_default_type
  90. ap_destroy_mutex
  91. ap_destroy_pool
  92. ap_destroy_sub_req
  93. ap_die
  94. ap_discard_request_body
  95. ap_document_root
  96. ap_each_byterange
  97. ap_error_log2stderr
  98. ap_escape_html
  99. ap_escape_path_segment
  100. ap_escape_quotes
  101. ap_escape_shell_cmd
  102. ap_exists_config_define
  103. ap_exists_scoreboard_image
  104. ap_field_noparam
  105. ap_finalize_request_protocol
  106. ap_finalize_sub_req_protocol
  107. ap_find_command
  108. ap_find_command_in_modules
  109. ap_find_last_token
  110. ap_find_linked_module
  111. ap_find_list_item
  112. ap_find_module_name
  113. ap_find_path_info
  114. ap_find_pool
  115. ap_find_token
  116. ap_find_types
  117. ap_fini_vhost_config
  118. ap_fnmatch
  119. ap_force_library_loading
  120. ap_getparents
  121. ap_getpass
  122. ap_getword
  123. ap_getword_conf
  124. ap_getword_conf_nc
  125. ap_getword_nc
  126. ap_getword_nulls
  127. ap_getword_nulls_nc
  128. ap_getword_white
  129. ap_getword_white_nc
  130. ap_get_basic_auth_pw
  131. ap_get_client_block
  132. ap_get_gmtoff
  133. ap_get_limit_req_body
  134. ap_get_list_item
  135. ap_get_local_host
  136. ap_get_module_config
  137. ap_get_remote_host
  138. ap_get_remote_logname
  139. ap_get_server_built
  140. ap_get_server_name
  141. ap_get_server_port
  142. ap_get_server_version
  143. ap_get_time
  144. ap_get_token
  145. ap_get_virthost_addr
  146. ap_get_win32_interpreter
  147. ap_gm_timestr_822
  148. ap_gname2id
  149. ap_handle_command
  150. ap_hard_timeout
  151. ap_header_parse
  152. ap_ht_time
  153. ap_ind
  154. ap_index_of_response
  155. ap_init_alloc
  156. ap_init_modules
  157. ap_init_vhost_config
  158. ap_init_virtual_host
  159. ap_internal_redirect
  160. ap_internal_redirect_handler
  161. ap_invoke_handler
  162. ap_is_default_port
  163. ap_is_directory
  164. ap_is_fnmatch
  165. ap_is_HTTP_CLIENT_ERROR
  166. ap_is_HTTP_ERROR
  167. ap_is_HTTP_INFO
  168. ap_is_HTTP_REDIRECT
  169. ap_is_HTTP_SERVER_ERROR
  170. ap_is_HTTP_SUCCESS
  171. ap_is_initial_req
  172. ap_is_matchexp
  173. ap_is_url
  174. ap_keepalive_timeout
  175. ap_kill_cleanup
  176. ap_kill_cleanups_for_fd
  177. ap_kill_cleanups_for_socket
  178. ap_kill_timeout
  179. ap_limit_section
  180. ap_log_assert
  181. ap_log_error
  182. ap_log_error_old
  183. ap_log_pid
  184. ap_log_printf
  185. ap_log_reason
  186. ap_log_rerror
  187. ap_log_transaction
  188. ap_log_unixerr
  189. ap_make_array
  190. ap_make_dirstr
  191. ap_make_dirstr_parent
  192. ap_make_dirstr_prefix
  193. ap_make_etag
  194. ap_make_full_path
  195. ap_make_sub_pool
  196. ap_make_table
  197. ap_matches_request_vhost
  198. ap_md5
  199. ap_md5context
  200. ap_md5contextTo64
  201. ap_md5digest
  202. ap_MD5Encode
  203. ap_MD5Final
  204. ap_MD5Init
  205. ap_MD5Update
  206. ap_md5_binary
  207. ap_meets_conditions
  208. ap_merge_per_dir_configs
  209. ap_method_number_of
  210. AP_MODULE_MAGIC_AT_LEAST
  211. ap_no2slash
  212. ap_note_auth_failure
  213. ap_note_basic_auth_failure
  214. ap_note_cleanups_for_fd
  215. ap_note_cleanups_for_file
  216. ap_note_cleanups_for_h
  217. ap_note_cleanups_for_socket
  218. ap_note_digest_auth_failure
  219. ap_note_subprocess
  220. ap_null_cleanup
  221. ap_open_logs
  222. ap_open_mutex
  223. ap_open_piped_log
  224. ap_os_canonical_filename
  225. ap_os_case_canonical_filename
  226. ap_os_escape_path
  227. ap_os_is_filename_valid
  228. ap_os_is_path_absolute
  229. ap_os_systemcase_filename
  230. ap_overlap_tables
  231. ap_overlay_tables
  232. ap_palloc
  233. ap_parseHTTPdate
  234. ap_parse_hostinfo_components
  235. ap_parse_htaccess
  236. ap_parse_uri
  237. ap_parse_uri_components
  238. ap_parse_vhost_addrs
  239. ap_pbase64decode
  240. ap_pbase64encode
  241. ap_pcalloc
  242. ap_pcfg_openfile
  243. ap_pcfg_open_custom
  244. ap_pclosedir
  245. ap_pclosef
  246. ap_pcloseh
  247. ap_pclosesocket
  248. ap_pduphostent
  249. ap_pfclose
  250. ap_pfdopen
  251. ap_pfopen
  252. ap_pgethostbyname
  253. ap_pool_is_ancestor
  254. ap_pool_join
  255. ap_popendir
  256. ap_popenf
  257. ap_pregcomp
  258. ap_pregfree
  259. ap_pregsub
  260. ap_process_request
  261. ap_process_resource_config
  262. ap_psignature
  263. ap_psocket
  264. ap_psprintf
  265. ap_pstrcat
  266. ap_pstrdup
  267. ap_pstrndup
  268. ap_push_array
  269. ap_pvsprintf
  270. ap_rationalize_mtime
  271. ap_read_config
  272. ap_read_request
  273. ap_regerror
  274. ap_regexec
  275. ap_register_cleanup
  276. ap_register_other_child
  277. ap_registry_get_server_root
  278. ap_registry_get_service_conf
  279. ap_registry_set_service_conf
  280. ap_release_mutex
  281. ap_remove_loaded_module
  282. ap_remove_module
  283. ap_remove_spaces
  284. ap_requires
  285. ap_reset_timeout
  286. ap_response_code_string
  287. ap_rfc1413
  288. ap_rflush
  289. ap_rind
  290. ap_rprintf
  291. ap_rputc
  292. ap_rputs
  293. ap_run_cleanup
  294. ap_run_fixups
  295. ap_run_post_read_request
  296. ap_run_sub_req
  297. ap_rvputs
  298. ap_rwrite
  299. ap_satisfies
  300. ap_scan_script_header_err
  301. ap_scan_script_header_err_buff
  302. ap_scan_script_header_err_core
  303. ap_send_error_response
  304. ap_send_fb
  305. ap_send_fb_length
  306. ap_send_fd
  307. ap_send_fd_length
  308. ap_send_header_field
  309. ap_send_http_header
  310. ap_send_http_options
  311. ap_send_http_trace
  312. ap_send_mmap
  313. ap_send_size
  314. ap_server_root_relative
  315. ap_setup_client_block
  316. ap_setup_prelinked_modules
  317. ap_set_byterange
  318. ap_set_callback_and_alarm
  319. ap_set_content_length
  320. ap_set_etag
  321. ap_set_file_slot
  322. ap_set_flag_slot
  323. ap_set_keepalive
  324. ap_set_last_modified
  325. ap_set_module_config
  326. ap_set_name_virtual_host
  327. ap_set_string_slot
  328. ap_set_string_slot_lower
  329. ap_set_sub_req_protocol
  330. ap_SHA1Final
  331. ap_SHA1Init
  332. ap_SHA1Update
  333. ap_SHA1Update_binary
  334. ap_sha1_base64
  335. ap_should_client_block
  336. ap_show_directives
  337. ap_show_modules
  338. ap_size_list_item
  339. ap_snprintf
  340. ap_soft_timeout
  341. ap_some_auth_required
  342. ap_spawn_child
  343. ap_spawn_child_err
  344. ap_spawn_child_err_buff
  345. ap_srm_command_loop
  346. ap_start_restart
  347. ap_start_shutdown
  348. ap_status_drops_connection
  349. ap_strcasecmp_match
  350. ap_strcasestr
  351. ap_strcmp_match
  352. ap_str_tolower
  353. ap_sub_req_lookup_file
  354. ap_sub_req_lookup_uri
  355. ap_sub_req_method_uri
  356. ap_sync_scoreboard_image
  357. ap_table_add
  358. ap_table_addn
  359. ap_table_do
  360. ap_table_get
  361. ap_table_merge
  362. ap_table_mergen
  363. ap_table_set
  364. ap_table_setn
  365. ap_table_unset
  366. ap_time_process_request
  367. ap_tm2sec
  368. ap_to64
  369. ap_translate_name
  370. ap_uname2id
  371. ap_unblock_alarms
  372. ap_unescape_url
  373. ap_unparse_uri_components
  374. ap_unregister_other_child
  375. ap_update_child_status
  376. ap_update_mtime
  377. ap_update_vhost_from_headers
  378. ap_update_vhost_given_ip
  379. ap_util_init
  380. ap_util_uri_init
  381. ap_uudecode
  382. ap_uuencode
  383. ap_validate_password
  384. ap_vbprintf
  385. ap_vformatter
  386. ap_vrprintf
  387. ap_vsnprintf
  388. ascii2ebcdic
  389. closedir
  390. ebcdic2ascii
  391. HTTP_VERSION
  392. HTTP_VERSION_MAJOR
  393. HTTP_VERSION_MINOR
  394. MODULE_MAGIC_AT_LEAST
  395. opendir
  396. OS_ASC
  397. os_spawnle
  398. os_spawnv
  399. os_spawnve
  400. os_stat
  401. os_strftime
  402. readdir
  403. regcomp
  404. regerror
  405. regexec
  406. regfree

Data Structure Definitions


  1. apache_sfio
  2. AP_MD5_CTX
  3. ap_pool
  4. ap_vformatter_buff
  5. ap_wait_t
  6. array_header
  7. BUFF
  8. child_info
  9. cmd_parms
  10. command_rec
  11. configfile_t
  12. conn_rec
  13. global_score
  14. HANDLE
  15. module
  16. mutex
  17. parent_score
  18. piped_log
  19. pool
  20. regex_t
  21. regmatch_t
  22. request_rec
  23. scoreboard
  24. server_addr_rec
  25. server_rec
  26. short_score
  27. table
  28. uri_components
  29. vtime_t

Global Data Cells


  1. ap_daemons_limit
  2. ap_daemons_max_free
  3. ap_daemons_min_free
  4. ap_daemons_to_start
  5. ap_day_snames
  6. ap_excess_requests_per_child
  7. ap_extended_status
  8. ap_group_id
  9. ap_loaded_modules
  10. ap_max_requests_per_child
  11. ap_month_snames
  12. ap_my_generation
  13. ap_pid_fname
  14. ap_restart_time
  15. ap_scoreboard_fname
  16. ap_scoreboard_image
  17. ap_server_argv0
  18. ap_server_confname
  19. ap_server_root
  20. ap_standalone
  21. ap_suexec_enabled
  22. ap_threads_per_child
  23. ap_user_id
  24. ap_user_name
  25. core_module
  26. top_module

Constant Definitions

Many of the compile-time choices are determined by the settings of various constants created with #define statements. Things like the maximum size of fixed-length buffers, the server version string, and operating system-specific code fragment compilation are controlled by constants.

Some of the Apache Web server's constants (such as SERVER_VERSION) can be overridden with compile-time definitions on the compiler command line. Others, like MAX_STRING_LEN, are provided as conveniences, and shouldn't be modified except under special circumstances. Still others, such as OR_LIMIT, have specific values that must not be altered.


  1. ACCESS_CONF
  2. APLOG_ALERT
  3. APLOG_CRIT
  4. APLOG_DEBUG
  5. APLOG_EMERG
  6. APLOG_ERR
  7. APLOG_INFO
  8. APLOG_LEVELMASK
  9. APLOG_MARK
  10. APLOG_NOERRNO
  11. APLOG_NOTICE
  12. APLOG_WARNING
  13. APLOG_WIN32ERROR
  14. BIG_SECURITY_HOLE
  15. BO_BYTECT
  16. B_ASCII2EBCDIC
  17. B_CHUNK
  18. B_EBCDIC2ASCII
  19. B_EOF
  20. B_EOUT
  21. B_ERROR
  22. B_RD
  23. B_RDERR
  24. B_RDWR
  25. B_SAFEREAD
  26. B_SFIO
  27. B_SOCKET
  28. B_WR
  29. B_WRERR
  30. cmd_how
  31. CR
  32. CRLF
  33. DECLINED
  34. DECLINE_CMD
  35. DEFAULT_ADMIN
  36. DEFAULT_CONTENT_TYPE
  37. DEFAULT_HTTPS_PORT
  38. DEFAULT_HTTP_PORT
  39. DEFAULT_INDEX
  40. DEFAULT_KEEPALIVE
  41. DEFAULT_KEEPALIVE_TIMEOUT
  42. DEFAULT_PATH
  43. DEFAULT_TIMEOUT
  44. DOCUMENT_LOCATION
  45. DONE
  46. DYNAMIC_MODULE_LIMIT
  47. FLAG
  48. FNM_CASE_BLIND
  49. FNM_NOESCAPE
  50. FNM_NOMATCH
  51. FNM_PATHNAME
  52. FNM_PERIOD
  53. GLOBAL_ONLY
  54. HARD_SERVER_LIMIT
  55. HTTPD_ROOT
  56. HTTP_ACCEPTED
  57. HTTP_BAD_GATEWAY
  58. HTTP_BAD_REQUEST
  59. HTTP_CONFLICT
  60. HTTP_CONTINUE
  61. HTTP_CREATED
  62. HTTP_EXPECTATION_FAILED
  63. HTTP_FAILED_DEPENDENCY
  64. HTTP_FORBIDDEN
  65. HTTP_GATEWAY_TIME_OUT
  66. HTTP_GONE
  67. HTTP_INSUFFICIENT_STORAGE
  68. HTTP_INTERNAL_SERVER_ERROR
  69. HTTP_LENGTH_REQUIRED
  70. HTTP_LOCKED
  71. HTTP_METHOD_NOT_ALLOWED
  72. HTTP_MOVED_PERMANENTLY
  73. HTTP_MOVED_TEMPORARILY
  74. HTTP_MULTIPLE_CHOICES
  75. HTTP_NON_AUTHORITATIVE
  76. HTTP_NOT_ACCEPTABLE
  77. HTTP_NOT_EXTENDED
  78. HTTP_NOT_FOUND
  79. HTTP_NOT_IMPLEMENTED
  80. HTTP_NOT_MODIFIED
  81. HTTP_NO_CONTENT
  82. HTTP_OK
  83. HTTP_PARTIAL_CONTENT
  84. HTTP_PAYMENT_REQUIRED
  85. HTTP_PRECONDITION_FAILED
  86. HTTP_PROCESSING
  87. HTTP_PROXY_AUTHENTICATION_REQUIRED
  88. HTTP_RANGE_NOT_SATISFIABLE
  89. HTTP_REQUEST_ENTITY_TOO_LARGE
  90. HTTP_REQUEST_TIME_OUT
  91. HTTP_REQUEST_URI_TOO_LARGE
  92. HTTP_RESET_CONTENT
  93. HTTP_SEE_OTHER
  94. HTTP_SERVICE_UNAVAILABLE
  95. HTTP_SWITCHING_PROTOCOLS
  96. HTTP_UNAUTHORIZED
  97. HTTP_UNPROCESSABLE_ENTITY
  98. HTTP_UNSUPPORTED_MEDIA_TYPE
  99. HTTP_USE_PROXY
  100. HTTP_VARIANT_ALSO_VARIES
  101. HTTP_VERSION_NOT_SUPPORTED
  102. HUGE_STRING_LEN
  103. ITERATE
  104. ITERATE2
  105. kill_conditions
  106. LF
  107. MAX_STRING_LEN
  108. MODULE_MAGIC_COOKIE
  109. MODULE_MAGIC_NUMBER
  110. MODULE_MAGIC_NUMBER_MAJOR
  111. MODULE_MAGIC_NUMBER_MINOR
  112. MULTI_ERR
  113. MULTI_OK
  114. MULTI_TIMEOUT
  115. M_CONNECT
  116. M_COPY
  117. M_DELETE
  118. M_GET
  119. M_INVALID
  120. M_LOCK
  121. M_MKCOL
  122. M_MOVE
  123. M_OPTIONS
  124. M_PATCH
  125. M_POST
  126. M_PROPFIND
  127. M_PUT
  128. M_TRACE
  129. M_UNLOCK
  130. NOT_IN_DIRECTORY
  131. NOT_IN_DIR_LOC_FILE
  132. NOT_IN_FILES
  133. NOT_IN_LIMIT
  134. NOT_IN_LOCATION
  135. NOT_IN_VIRTUALHOST
  136. NO_ARGS
  137. OK
  138. OPT_ALL
  139. OPT_EXECCGI
  140. OPT_INCLUDES
  141. OPT_INCNOEXEC
  142. OPT_INDEXES
  143. OPT_MULTI
  144. OPT_NONE
  145. OPT_SYM_LINKS
  146. OPT_SYM_OWNER
  147. OPT_UNSET
  148. OR_AUTHCFG
  149. OR_FILEINFO
  150. OR_INDEXES
  151. OR_LIMIT
  152. OR_OPTIONS
  153. proxyreqtype
  154. RAW_ARGS
  155. REQUEST_CHUNKED_DECHUNK
  156. REQUEST_CHUNKED_ERROR
  157. REQUEST_CHUNKED_PASS
  158. REQUEST_NO_BODY
  159. RSRC_CONF
  160. SECURITY_HOLE_PASS_AUTHORIZATION
  161. SERVER_BUSY_DNS
  162. SERVER_BUSY_KEEPALIVE
  163. SERVER_BUSY_LOG
  164. SERVER_BUSY_READ
  165. SERVER_BUSY_WRITE
  166. SERVER_DEAD
  167. SERVER_GRACEFUL
  168. SERVER_NUM_STATUS
  169. SERVER_READY
  170. SERVER_STARTING
  171. SERVER_SUPPORT
  172. SERVER_VERSION
  173. STANDARD_MODULE_STUFF
  174. START_PREQUEST
  175. STOP_PREQUEST
  176. TAKE1
  177. TAKE12
  178. TAKE123
  179. TAKE13
  180. TAKE2
  181. TAKE23
  182. TAKE3
  183. TARGET