Fantastic way to wrangle some good software product is to experience it firsthand.So lets try Nginx today.And i have a weired hobby of connecting my fav software products with comic characters.
I have choosen Green Latern as Nginx
"All the powers that the Power Ring gives"
Nginx [engine x] is a free and opensource high performance web-server that can be used as
- Reverse proxy
- Load balancer
- SMTP proxy
- TCP/UDP proxy server.
There is a commercial edition available for Nginx called as Nginx Plus.
Nginx source code is published on mercurial http://hg.nginx.org/nginx/file/tip , May be its new info for your, Mercurial is a free multiplatform distributed version control system. Mercurial is used via the command line; the program file itself is called hg.So like git we can download the nginx code using below command line.
hg clone http://hg.nginx.org/nginx
If you want to build the nginx from the source code please follow the link http://nginx.org/en/docs/howto_build_on_win32.html
The Nginx configuration file consist of Directives and Contexts
NGINX configuration consists of key-value pairs called directives. Directives decides which configuration to apply.They can be organized and grouped into Blocks known as Contexts.
Contexts are tree like structures that can be nested within one another and Directives can only been used within Contexts.
The main purpose of the master process is to read and evaluate configuration, and maintain worker processes.
Worker processes do actual processing of requests. nginx employs event-based model and OS-dependent mechanisms to efficiently distribute requests among worker processes.
The number of worker processes is defined in the configuration file and may be fixed for a given configuration.
Each worker process can open a by default 512 connections
As previously mentioned, nginx doesn't spawn a process or thread for every connection. Instead, worker processes accept new requests from a shared "listen" socket and execute a highly efficient run-loop inside each worker to process thousands of connections per worker
Nginx can be extended by using thrid-party modules.There is a large ecosystem of third‑party modules, ranging from language interpreters to security solutions.
Have a look at the below nginx blog about compling dynamic modules for nginx