Home > System Tutorial > LINUX > Nginx Getting Started Tutorial

Nginx Getting Started Tutorial

WBOY
Release: 2024-07-17 07:21:20
Original
1187 people have browsed it
1. Introduction to Nginx
1.1Nginx Features

Modular design, good scalability

High reliability

Support hot deployment: update configuration files, upgrade versions, and replace log files without downtime

Low memory consumption: 10,000 inactive connections in keep-alive connection mode only require 2.5M memory event-driven, aio, mmap, sendfile

Basic functions of 1.2Nginx

Web server for static resources

http protocol reverse proxy server

pop3/imap4 protocol reverse proxy server

FastCGI(lnmp), uWSGI(python) and other protocols

Modular (non-DSO) like zip, SSL modules

1.3Nginx web service related features

Virtual host (server)

Support keep-alive and pipe connections

Access log (supports improving its performance based on log buffering)

url rewirte path alias

Access control based on IP and user

Supports rate limit and concurrency limit

Reconfiguration and online upgrades without interrupting customer work processes

Memcached’s GET interface

2. Nginx service architecture
master/worker structure

Nginx Getting Started Tutorial

Master process: Responsible for loading and analyzing configuration files, managing worker processes, and smooth upgrades

Worker process: Receive client requests, send requests to each module at once for filtering, I/O calls, data caching, and send responses

Cache-related processes: composed of cache loader (cache index reconstruction) and cache manager (cache index management)

--Cache loader is generated by the main process after the Nginx service is started, and exits after establishing an index metadata database based on the cache on the local disk.

--Cache manager makes a judgment on whether the metadata has expired after the metadata update is completed.

3. Nginx configuration file structure
Components of the profile

Main configuration file: nginx.conf

Sub-configuration file: include conf.d/*.conf

fastcgi, uwsgi, scgi: and other protocol-related configuration files. Under the root path

mime.types: Supported mime types. Under the root path

Nginx Getting Started Tutorial

4. Basic configuration examples

Nginx Getting Started Tutorial

The above is the detailed content of Nginx Getting Started Tutorial. For more information, please follow other related articles on the PHP Chinese website!

source:linuxprobe.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template