atkisc
2010/06/22 21:43
学习了
atkisc
2010/06/22 21:43
看到你LVS三种模式配置总结的文章,有两个疑问,给你文章留言也没回,还是想再留一次言试试吧,呵呵
1.在LVS/NAT配置的LVS server配置中,有这么两行:
#set LVS
/sbin/ipvsadm -a -t 202.99.59.110:80 -r 10.1.1.2:80 -m -w 1
/sbin/ipvsadm -a -t 202.99.59.110:80 -r 10.1.1.3:80 -m -w 1
这两句之前你都不设置调度算法吗?应该补充如下一句吧?
/sbin/ipvsadm -A -t $VIP:80 -s rr
2.在LVS/TUN配置的real server配置中,你关闭了real server的TUN端口,为何要把ip_forward打开?
echo "Tunl port closing"
ifconfig tunl0 down
echo 1 > /proc/sys/net/ipv4/ip_forward
希望可以给个回答
1.在LVS/NAT配置的LVS server配置中,有这么两行:
#set LVS
/sbin/ipvsadm -a -t 202.99.59.110:80 -r 10.1.1.2:80 -m -w 1
/sbin/ipvsadm -a -t 202.99.59.110:80 -r 10.1.1.3:80 -m -w 1
这两句之前你都不设置调度算法吗?应该补充如下一句吧?
/sbin/ipvsadm -A -t $VIP:80 -s rr
2.在LVS/TUN配置的real server配置中,你关闭了real server的TUN端口,为何要把ip_forward打开?
echo "Tunl port closing"
ifconfig tunl0 down
echo 1 > /proc/sys/net/ipv4/ip_forward
希望可以给个回答
张明辉 回复于 2010/06/24 21:47
是的,需要添加
ipvsadm -A -t $VIP:80 -s wlc/rr
"wlc或者 rr" 都可以
原文我已经更改了,谢谢你的提示
ipvsadm -A -t $VIP:80 -s wlc/rr
"wlc或者 rr" 都可以
原文我已经更改了,谢谢你的提示
你的expires 设置的是以(gif|jpg|jpeg|png|bmp|swf|html) 结尾的文件,又不是首页,
jason
2010/04/28 20:21
张老大,问你个问题:我用curl工具查询了你的首页,知道你的首页设置了expires
curl -I www.6curl.com
HTTP/1.1 200 OK
Date: Wed, 28 Apr 2010 12:12:34 GMT
Server: Apache
X-Powered-By: PHP/5.2.13
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Wed, 28 Apr 2010 12:12:34 GMT
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
但是我在我的nginx服务器上也设置了expires,但是用curl工具却查不到expires,不知是那出错了,张老大帮我看看吧
nginx的expires设置如下:
server
{
listen 80;
server_name *.*.*.*;
index index.html index.htm index.php;
root /data0/htdocs/wordpress;
#limit_conn crawler 20;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~* ^.+\.(gif|jpg|jpeg|png|bmp|swf|html)$
{
expires 30d;
}
location ~* ^.+\.(js|css)?$
{
expires 1h;
}
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /data1/logs/access.log access;
}
curl的查询结果如下:
HTTP/1.1 200 OK
Server: nginx/0.8.15
Date: Wed, 28 Apr 2010 20:21:43 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.2.10
curl -I www.6curl.com
HTTP/1.1 200 OK
Date: Wed, 28 Apr 2010 12:12:34 GMT
Server: Apache
X-Powered-By: PHP/5.2.13
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Wed, 28 Apr 2010 12:12:34 GMT
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
但是我在我的nginx服务器上也设置了expires,但是用curl工具却查不到expires,不知是那出错了,张老大帮我看看吧
nginx的expires设置如下:
server
{
listen 80;
server_name *.*.*.*;
index index.html index.htm index.php;
root /data0/htdocs/wordpress;
#limit_conn crawler 20;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~* ^.+\.(gif|jpg|jpeg|png|bmp|swf|html)$
{
expires 30d;
}
location ~* ^.+\.(js|css)?$
{
expires 1h;
}
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /data1/logs/access.log access;
}
curl的查询结果如下:
HTTP/1.1 200 OK
Server: nginx/0.8.15
Date: Wed, 28 Apr 2010 20:21:43 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.2.10
呵呵,你的链接加上了,麻烦把我的链接www1.xpb.cn改成www.xpb.cn
支持博主一个哈!
张明辉 回复于 2010/02/02 21:15
恩,已经处理了你的链接




