1、用户、连接数设置
user:nginx主进程的启动用户
worker_processes:工作启动多少个进程,有几个CPU就设置为几
worker_connections:代表能够处理请求数,1核,处理请求为1*1024,4核,处理请求为4*1024
2、监听端口、默认访问页
3、添加status设置
在location下添加如下配置
location /status{
stub_status on;
access_log off;
allow 127.0.0.1;
#deny all;
}
4、nginx命令
./nginx -h
./nginx -V
./nginx -s reload 无感重启
./nginx -s relopen 有感重启
更多内容欢迎关注微信公众号查看