1、用户、连接数设置

user:nginx主进程的启动用户

worker_processes:工作启动多少个进程,有几个CPU就设置为几

worker_connections:代表能够处理请求数,1核,处理请求为1*1024,4核,处理请求为4*1024

Nginx简单配置和命令

2、监听端口、默认访问页

Nginx简单配置和命令

3、添加status设置

在location下添加如下配置

location /status{

        stub_status     on;

        access_log      off;

        allow 127.0.0.1;

        #deny all;

}

Nginx简单配置和命令

4、nginx命令

./nginx -h

Nginx简单配置和命令

./nginx -V

Nginx简单配置和命令

./nginx -s reload 无感重启

./nginx -s relopen 有感重启

相关文章:

  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2021-08-17
  • 2021-10-03
  • 2021-11-25
  • 2021-07-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-12
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案