Nginx Source file Structure Browse

Source: Internet
Author: User
I downloaded the Nginx source version is not tested, by date is - years 7 the latest version of the month. Unpack the package to get the source folder, go to the root directory to find a few subdirectories: Auto , conf , Contrib , Docs , Misc , src . Literally guessing, is automata or scripts ( Auto Script ), Configuration files ( Configuration ), supporting files ( Contributions ), Documents ( Document ), Miscellaneous ( Miscellaneous ), Source ( Source Code ).

1. Browse source folder root directory

As a rule, I choose to look at the document first, but the doc subdirectory does not have detailed offline documentation, only the links to the Nginx website and some small files that cannot be read.

Miscellaneous Misc only a gnumakefile and a README file that you don't understand .

The contrib subdirectory has a geo2nginx.pl(Geo module CSV Database format Conversion perl script), a set of encoding conversion files (including two encoding maps and a code conversion perl script), and vim the nginx Special syntax highlighting configuration file.

the Conf subdirectory has several encoding mappings, variable mapping tables, and a server configuration file.

There are many scripts in the Auto subdirectory that include the server installation script, and now it's hard to see the script, so it's just a simple glance. We found nginx to support many major operating system platforms: Apple's Open source system , Darwin, and the important Unix Branch FreeBSD,linux, and most versions of another Unix branch of the open source Solaris , the highest user share Win32 .

SRC subdirectory is really a need to study the nginx C Source, below we will explore.

2. Browse src sub-directory

or see what subdirectories are in the SRC subdirectory:core,event,http, Mail , Misc , MySQL , OS , Stream . Let's take a literal guess: the core (main function, data structure, Main method), event (event handling mechanism), Hypertext Transfer Protocol (http - related), mail (mail-related), miscellaneous (Google Perftools related source),mysql database, operating system (Unix and Win32 Two types of system system call program source code), stream (meaning unknown). Looks like . The/src/core subdirectory is a good start for researching the source code.

Figure 2 nginx source file structure diagram

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The above describes the Nginx source file structure browsing, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.