nginx的默认配置文件位于:
/etc/nginx/nginx.conf
#全局块
user www-data; #worker进程的运行用户
worker_processes 1; #worker数量,通常于cpu的数量保持一致
pid /run/nginx.pid; #保存nginx master的进程ID#events块
events {
worker_connections 768; #worker进程的最大连接数
}#业务块
http {
#http全局块sendfile on;
tcp_nopush on;
types_hash_max_size 2048;include /etc/nginx/mime.types;
default_type application/octet-stream;ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;access_log /var/log/nginx/access.log; #访问日志
error_log /var/log/nginx/error.log; #错误日志gzip on;