1.nginx的配置文件为准
/etc/nginx/nginx.conf # 全局配置
/etc/nginx/conf.d/*.conf # 自定义配置,如果需要自己配置,建议自己修改
/etc/nginx/sites-available # 默认配置
2.nginx配置文件介绍(/etc/nginx/nginx.conf)
全局块
user www-data;
worker_processes auto;
pid /run/nginx.pid;
enent块
events {
worker_connections 768;
# multi_accept on;
}
http块
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_p