# wget http://nginx.org/download/nginx-1.4.2.tar.gz # wget https://github.com/alibaba/nginx-http-sysguard/archive/master.zip \ -O nginx-http-sysguard-master.zip # unzip nginx-http-sysguard-master.zip # tar -xzvf nginx-1.4.2.tar.gz
# cd nginx-1.4.2 # patch -p1 < ../nginx-http-sysguard-master/nginx_sysguard_1.3.9.patch
# ./configure --prefix=/usr/local/nginx-1.4.2 \ --with-http_stub_status_module --add-module=../nginx-http-sysguard # make # make install
sysguard_load load=number [action=/url]
sysguard_mem swapratio=ratio% [action=/url]
sysguard_interval time
sysguard_log_level info | notice | warn | error
server {
listen 80;
server_name www.1sucai.cn www.heytool.com;
access_log /data/logs/nginx/www.1sucai.cn.access.log main;
index index.html index.php index.html;
root /data/site/www.1sucai.cn;
sysguard on;
# 为了方便测试,load阀值为0.01,平时大家一般都在5或10+
sysguard_load load=0.01 action=/loadlimit;
sysguard_mem swapratio=20% action=/swaplimit;
location / {
}
location /loadlimit {
return 503;
}
location /swaplimit {
return 503;
}
}
# uptime
16:23:37 up 6 days, 8:04, 2 users, load average: 0.00, 0.01, 0.05
# curl -I www.1sucai.cn
HTTP/1.1 403 Forbidden Server: nginx Date: Thu, 03 Oct 2013 16:27:13 GMT Content-Type: text/html Content-Length: 162 Connection: keep-alive
# uptime
16:25:59 up 6 days, 8:06, 2 users, load average: 0.05, 0.04, 0.05
# curl -I www.1sucai.cn
HTTP/1.1 503 Service Temporarily Unavailable Server: nginx Date: Thu, 03 Oct 2013 16:26:19 GMT Content-Type: text/html Content-Length: 206 Connection: keep-alive
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有