nginx和php-fpm一样内建了一个状态页,对于想了解nginx的状态以及监控nginx非常有帮助。
1. 启用nginx status配置
在默认主机里面加上location或者你希望能访问到的主机里面
<code>server {
listen *:<span>80</span> default_server;
server_name _;
location /ngx_status
{
stub_status <span>on</span>;
access_log <span>off</span>;
<span>#allow 127.0.0.1;</span><span>#deny all;</span>
}
}</code>2. 重启nginx
请依照你的环境重启你的nginx
<code><span># service nginx restart</span></code>
3. 打开status页面
<code><span># curl http</span>:<span>//127.0.0.1/ngx_status</span> Active connections: <span>11921</span>server accepts handled requests <span>11989</span><span>11989</span><span>11991</span>Reading: <span>0</span> Writing: <span>7</span> Waiting: <span>42</span></code>
4. nginx status详解
active connections – 活跃的连接数量
server accepts handled requests — 总共处理了11989个连接 , 成功创建11989次握手, 总共处理了11991个请求
reading — 读取客户端的连接数.
writing — 响应数据到客户端的数量
waiting — 开启 keep-alive 的情况下,这个值等于 active – (reading+writing), 意思就是 Nginx 已经处理完正在等候下一次请求指令的驻留连接.
以上就介绍了cookies必须启用才能登入 启用nginx status状态详解,包括了cookies必须启用才能登入方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号