- 论坛徽章:
- 0
|
请问apache中的keepalive可以在虚拟主机中使用吗?
官方上面简绍说可以,但是我在下面的配置中始终不成功。
源码安装2.2.9,
httpd.conf 这个文件只打开了httpd-vhosts.conf这行,其它的都没有变。
[root@localhost httpd-2.2.9]# grep httpd-vhost /usr/local/httpd/conf/httpd.conf
Include conf/extra/httpd-vhosts.conf
[root@localhost httpd-2.2.9]# tail -18 /usr/local/httpd/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/usr/local/httpd/htdocs"
ServerName huang2.huang.com
ErrorLog "logs/huang2-error_log"
CustomLog "logs/huang2-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/usr/local/httpd/htdocs"
ServerName huang1.huang.com
ErrorLog "logs/huang1-error_log"
CustomLog "logs/huang1-access_log" common
KeepAlive On
KeepAliveTimeout 50
</VirtualHost>
在IE用访问huang1.huang.com连刷几次就得到下面的结果。
[root@localhost httpd-2.2.9]# tcpdump -nn dst port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
06:56:16.864013 IP 192.168.11.1.3986 > 192.168.11.11.80: S 2739183246:2739183246(0) win 65535 <mss 1460,nop,nop,sackOK>
06:56:16.866912 IP 192.168.11.1.3986 > 192.168.11.11.80: . ack 1502968652 win 65535
06:56:16.868187 IP 192.168.11.1.3986 > 192.168.11.11.80: P 0:383(383) ack 1 win 65535
06:56:17.112926 IP 192.168.11.1.3986 > 192.168.11.11.80: . ack 190 win 65346
06:56:20.907929 IP 192.168.11.1.3986 > 192.168.11.11.80: P 383:766(383) ack 190 win 65346
06:56:20.993750 IP 192.168.11.1.3986 > 192.168.11.11.80: . ack 378 win 65158
06:56:25.911254 IP 192.168.11.1.3986 > 192.168.11.11.80: . ack 379 win 65158
06:56:27.917782 IP 192.168.11.1.3986 > 192.168.11.11.80: F 766:766(0) ack 379 win 65158
06:56:27.924634 IP 192.168.11.1.3994 > 192.168.11.11.80: S 2041118069:2041118069(0) win 65535 <mss 1460,nop,nop,sackOK>
06:56:27.925631 IP 192.168.11.1.3994 > 192.168.11.11.80: . ack 1512827060 win 65535
06:56:27.929804 IP 192.168.11.1.3994 > 192.168.11.11.80: P 0:383(383) ack 1 win 65535
06:56:28.125682 IP 192.168.11.1.3994 > 192.168.11.11.80: . ack 190 win 65346
06:56:32.940455 IP 192.168.11.1.3994 > 192.168.11.11.80: . ack 191 win 65346
06:56:33.703056 IP 192.168.11.1.3994 > 192.168.11.11.80: R 383:383(0) ack 191 win 0
请问我上面是那里配置错误了吗? |
|