Nginx module Dynamic loading (HTTP)

Source: Internet
Author: User
  1. Parsing section
    1. Dynamically load all modules, maintaining a global array modules[nmodules];
    2. Parse the configuration file, record the modules used for each block and sub-block, subdivide to the location level (merge), maintain a global array call_modulers[nlocations][ncallmodulers], whenever a location is generated, nlocations++;
    3. Add default module and configuration for each location in Call_modulers, all modules are loaded;
    4. Each location in the merge Call_modulers uses the callback of the module's phase, which can be replaced by local variables based on the order in which the modules are called, or in the order in which they are loaded.
  2. Process section
    1. Get rid of all phase processes
    2. According to the request and location matching rules, find the call_modulers used;
    3. In the original call phase place to call to find the call_modulers location of the phase;
    4. The global variables used in request and response processing are replaced with local variables for each location.

Nginx module Dynamic loading (HTTP)

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.