Apache processing request steps and procedures

Source: Internet
Author: User

Apache Request processing loop detailed :

1, Post-read-request stage: In the normal request processing process, this is the module can be inserted into the first stage of the hook. This phase can be exploited for modules that want to enter processing requests very early.

2. URI Translation phase: The main work of Apache at this stage: map the requested URL to the local file system. The module can insert hooks at this stage to perform its own mapping logic. Mod_alias is using this phase to work.

3, header parsing stage: Apache at this stage of the main work: Check the head of the request. This hook is rarely used because the module can perform the task of inspecting the request header at any point in the request processing process. Mod_setenvif is using this phase to work.

4. Access Control phase: The main work of Apache at this stage: check whether the requested resource is allowed to be accessed according to the configuration file. The standard logic of Apache implements the Allow and deny directives. Mod_authz_host is using this phase to work.

5, authentication stage: Apache in this stage of the main work: according to the configuration file set policy to authenticate users, and set the user name area. The module can insert hooks at this stage to implement an authentication method.

6, Authorization stage: Apache in this phase of the main work: according to the configuration file check whether to allow authenticated users to perform the requested operation. The module can insert hooks at this stage to implement a user rights management approach.

7. MIME type checking stage: The main work of Apache at this stage: Determine the content handler that will be used, based on the rules of the MIME type of the requested resource. The standard modules mod_negotiation and mod_mime implement this hook.

8. Fixup phase: This is a generic phase that allows the module to run any necessary process before the content generator. Similar to Post_read_request, this is a hook that captures any information and is the most commonly used hook.

9, Response stage: Apache at this stage of the main work: generate the content returned to the client, responsible for sending a proper reply to the client. This phase is a core part of the entire processing process.

10, logging stage: Apache in this phase of the main work: after the reply has been sent to the client after the transaction. The module may modify or replace the standard log records of Apache.

11, Cleanup stage: Apache at this stage of the main work: clean up the environment after the request transaction processing completed, such as file, directory processing or socket closure, etc., this is the last phase of Apache request processing.

Apache processing request steps and procedures

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.