1 配置文件说明
Description | Path/Folder |
---|---|
Nginx configuration files | /etc/nginx |
Main configuration file | /etc/nginx/nginx.conf |
Virtual hosts configuration files (including default one) | /etc/nginx/conf.d |
Custom configuration files | /etc/nginx/conf.d |
Log files (both access and error log) | /var/log/nginx |
Temporary files | /var/lib/nginx |
Default virtual host files | /usr/share/nginx/html |
2 Nginx config目录下配置文件说明
File name | Description |
---|---|
mime.types | This contains the default MIME type map for converting file extensions into MIME types. |
fastcgi_params | This contains the default FastCGI parameters required for FastCGI to function. |
scgi_params | This contains the default SCGI parameters required for SCGI to function. |
uwsgi_params | This contains the default UWCGI parameters required for UWCGI to function. |
proxy_params | This contains the default proxy module parameters. This parameter set is required for certain web servers when they are behind Nginx, so that they can figure out they are behind a proxy. |
naxsi.rules (optional) | This is the main rule set for the NAXSI web application firewall module. |
koi-utf, koi-win, and win-utf | These are the Cyrillic character set conversion tables. |
3 Nginx Directive的参数类型
Value type | Format | Example of a value |
---|---|---|
Flag | [on | off] | on, off |
Signed integer | -?[0-9]+ | 1024 |
Size | [0-9]+([mM] | [kK])? | 23M, 12348k |
Offset | [0-9]+([mM] | [kK]|[gG])? | 43G, 256M |
Milliseconds | [0-9]+[yMwdhms]? | 30s, 60m |
4 Nginx Signal控制
Signal | Function |
---|---|
TERM, INT | Fast shutdown |
QUIT | Graceful shutdown |
HUP | Reconfiguration |
USR1 | Log file reopening |
USR2 | Nginx binary upgrade |
WINCH | Graceful worker shutdown |