nginx configuration file nginx.conf

nginx.conf profile
user nginx nginx; # belongs to the user and group
worker_processes 2; # number of cpu core work processes to determine the number
worker_cpu_affinity 01 10; #cpu task allocation
worker_rlimit_nofile 102400; # number of files a process can open ulimit -n View local and consistent system

logs the error_log / the error.log;
PID logs / nginx.pid; # PID storage position

{Events
use the epoll; #epoll model
worker_connections 4096; # concurrency
}

http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '#以什么格式定义输出
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log logs / access.log main; # define the log output
sendfile on; # Allow file download
keepalive_timeout 65; # timeout

{Server
the listen 80; # listening port
server_name www.crushlinux.com; # domain
charset utf-8; # character set

location / {# access / time to
root html; # to find html page
index index.html index.htm; # define default home page
}
LOCATION / Status {
stub_status ON;
access_log OFF;


}

error_page 500 502 503 504 /50x.html;
location =/50x.html{
root html;
}
}

}

Guess you like

Origin www.cnblogs.com/zcdhhh/p/11504676.html