Home > Article > Backend Development > Nginx configuration file brief description
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
Every worker The number of connections allowed by the process
use epoll;networkI/Oevent model,linuxrecommendedepoll,FreeBSDrecommended kqueue }http {
/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
accessThe path of the log file , is recorded in the
mainon; tcp_nopush on; tcp_nodelay on;
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)