Apache2 Command Access

Source: Internet
Author: User

Apache2 commands are divided into two types based on the input source: Command-Directive, which is input through the-C/-C parameter in the command line, and resource-Directive, is configured in the configuration file. The two commands are merged and saved to the conftree.

Process_command_config
Ap_process_resource_config

Command access steps:

1. Read the file HTTP. conf to the memory. The result of this operation is in the global variable defined in the tree ap_conftree (config. C.
Ap_read_config (process, ptemp, confname, & ap_conftree );

2. traverse the ap_conftree tree and execute the registration command.

Ap_pai_config (conftree, & parms, S-> lookup_defaults );

In the above two steps, we can use two hooks to influenceProgramBehavior:

 

// Read the configuration file to the memory and parse the command before
Ap_hook_pre_config (my_shm_create_handler, null, null, apr_hook_middle );
// After parsing the command
Ap_hook_post_config (my_conftree_restore_handler, null, null, apr_hook_middle );

 

So you can use it as an XML parser.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.