Nginx configuration file brief description

WBOY
Release: 2016-08-08 09:27:28
Original
1052 people have browsed it

Configuration file (Description)

user nginx; nginx’s running account (this account will be automatically created when rpm is installed ), can also be written as user nginx nginx represents users and groups

worker_processes 10;The number of worker processes(worker), is generally equal tocpunumber of cores or twice

worker_rlimit_nofile 100000; Number of file descriptors

error_log /var/log/nginx/error.log;#error_log /var/log/nginx/error.log notice;#error_log /var/log/nginx/error.log info;pid /var/run/nginx.pid;events {

Every worker The number of connections allowed by the process

use epoll;

networkI/Oevent model,linuxrecommendedepoll,FreeBSDrecommended kqueue }http {

include

/etc/nginx/mime.types;include is used to reference other configuration files , that is, you can write different configurations to different files according to your needs In the file default_type

application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" '                                                                                             body_bytes_sent "$http_referer"' access_log /var/ log/nginx/access.log main;

accessThe path of the log file , is recorded in the

main format defined above sendfile​

on; tcp_nopush on; tcp_nodelay on;

server_tokens off; gzip on;enable compression

gzip_static on;Enable the HTTPGzipStatic module ( is not in core and standard In the module group, but rpminstallation With this module)

​​​​gzip_comp_level 5;Compression level,1minimum fastest,9maximum slowest

gzip_min_length 1024;Compression The minimum length , is not compressed less than this length (This length is the Content-Length in header)

keepalive_timeout 65; limit_zone myzone $binary_remote_addr 10m; # Load config files from the /etc/nginx/conf.d directory include /etc/nginx/conf.d/*. conf; server { limit_conn myzone 10;

listen 80;

Port

                                                                                                                                                             Port,             koi8-r;                                                                                                                root /usr/share/nginx/html;

Master Table of contents                                                                                                                                                                                                          The above introduces a brief description of the Nginx configuration file, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.
Related labels:
source:php.cn
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!