曹珊瑚
2011-6-6 14:24
85年生,非计算机科班出来,大哥,你让我情何以堪啊
跨平台
2011-6-2 16:34
您好,我采用nginx作负载,负载机是A ,下面的两台机器是S1和S2 。如果S1和S2都正常运行时候,访问没有问题,但如果s1断开,再次访问就出现等待,请问是什么原因,怎样才能实现发现S1访问不了而马上去找S2
张哥
2011-6-1 17:43
ip_hash里边的
n = p / (8 * sizeof(uintptr_t));
m = (uintptr_t) 1 << p % (8 * sizeof(uintptr_t));
的作用是什么啊?
还有想问下:通过ip_hash进行负载均衡后,上游的服务器对请求处理的返回结果,能在原先的ip_hash里边的到吗?
以下代码产生alter: the process is exited!怎么修改好啊?
u_char *qs_start = (u_char *)r->args_start;
//如果是 u_char *qs_start = "n=n01&m=a"; 就不会产生alter: the process is exited!
u_char *getpar;
ngx_str_t nodeid = ngx_string("");
ngx_str_t hostid = ngx_string("");
nodeid.data = ngx_pcalloc(r->pool,sizeof("n01"));
hostid.data = ngx_pcalloc(r->pool,sizeof("a"));
nodeid.len = 4;
hostid.len = 2;
getpar = (strstr(qs_start, "n="));
getpar += 2;
n = p / (8 * sizeof(uintptr_t));
m = (uintptr_t) 1 << p % (8 * sizeof(uintptr_t));
的作用是什么啊?
还有想问下:通过ip_hash进行负载均衡后,上游的服务器对请求处理的返回结果,能在原先的ip_hash里边的到吗?
以下代码产生alter: the process is exited!怎么修改好啊?
u_char *qs_start = (u_char *)r->args_start;
//如果是 u_char *qs_start = "n=n01&m=a"; 就不会产生alter: the process is exited!
u_char *getpar;
ngx_str_t nodeid = ngx_string("");
ngx_str_t hostid = ngx_string("");
nodeid.data = ngx_pcalloc(r->pool,sizeof("n01"));
hostid.data = ngx_pcalloc(r->pool,sizeof("a"));
nodeid.len = 4;
hostid.len = 2;
getpar = (strstr(qs_start, "n="));
getpar += 2;
冰
2011-5-29 21:24
张哥,没整明白,有没有 说明书啊?350015800
网事随风
2011-5-29 16:40
为什么我打开ASP的站显示的是文件列表!!!打开源码文件,显示的是源代码
纠结
2011-5-28 23:27
访问http://127.0.0.1/phpmyadmin/ 页面出错是怎么回事
fjw
2011-5-27 08:52
接下
rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&
下面还有发不上去了,过滤了特殊字符
rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&
下面还有发不上去了,过滤了特殊字符
fjw
2011-5-27 08:48
接下
}
if ($request_uri ~* "[+|(%20)]union[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]and[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]exec[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]select[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]insert[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]delete[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]update[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]create[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]alter[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]drop[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]show[+|(%20)]") {
return 444;
}
#rewrite ^undefined$ index.html
rewrite ^/index.html$ /index.php last;
rewrite ^/category$ /index.php last;
#rewrite ^search.php$ index.html last;
# access any object by its numeric identifier
rewrite ^/feed-c([0-9]+).xml$ /feed.php?cat=$1 last;
rewrite ^/feed-b([0-9]+).xml$ /feed.php?brand=$1 last;
rewrite ^/feed.xml$ /feed.php last;
}
if ($request_uri ~* "[+|(%20)]union[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]and[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]exec[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]select[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]insert[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]delete[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]update[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]create[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]alter[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]drop[+|(%20)]") {
return 444;
}
if ($request_uri ~* "[+|(%20)]show[+|(%20)]") {
return 444;
}
#rewrite ^undefined$ index.html
rewrite ^/index.html$ /index.php last;
rewrite ^/category$ /index.php last;
#rewrite ^search.php$ index.html last;
# access any object by its numeric identifier
rewrite ^/feed-c([0-9]+).xml$ /feed.php?cat=$1 last;
rewrite ^/feed-b([0-9]+).xml$ /feed.php?brand=$1 last;
rewrite ^/feed.xml$ /feed.php last;














