Discussion:
keepalive timeout in name-based virtual hosts
(too old to reply)
Robin
2016-05-31 21:25:54 UTC
Permalink
Config: Apache/2.2.17, name-based virtual hosts.

Server config (NOT vhosts) contains:
KeepAlive on
KeepAliveTimeout 5

However, monitoring traffic on ports 80 & 443 with tcpdump, I see
exchanges long after 5 seconds since the last request from a given client
IP - sometimes hours. These exchanges are always initiated by the
server, and aren't logged by the server.

What's going on here? I note the Apache KeepAliveTimeout manual entry
states:

"In a name-based virtual host context, the value of the first defined
virtual host (the default host) in a set of NameVirtualHost will be used.
The other values will be ignored."

What on earth is that gobbledy-gook supposed to mean?

I presume "the value of the first defined virtual host (the default
host)" should properly say "the value [of KeepAliveTimeout] IN the first
defined virtual host (the default host)", (a vhost does not have a
"value") and "The other values will be ignored" means "values [of
KeepAliveTimeout] in other [subsequently defined] vhosts will be ignored".

Am I right? Is the KeepAliveTimeout value defined in config being
propagated to all vhosts, or are they using the default (15?).

Even so, how come the much delayed server responses?

TIA
Валентин Ким
2016-06-24 14:27:49 UTC
Permalink
Post by Robin
Config: Apache/2.2.17, name-based virtual hosts.
What on earth is that gobbledy-gook supposed to mean?
I presume "the value of the first defined virtual host (the default
host)" should properly say "the value [of KeepAliveTimeout] IN the first
defined virtual host (the default host)", (a vhost does not have a
"value") and "The other values will be ignored" means "values [of
KeepAliveTimeout] in other [subsequently defined] vhosts will be ignored".
Hey

You probably need to create a single default virtual host for <your server IP>:80 and add your KeepAliveTimeout directive there.

Apache will use that first defined virtual host settings for the server-wide settings so far I know.

I can't check it right now but I think that will be the solution of your issue.

You can also take a look here for some Apache tweaks too, it may help: https://serversuit.com/community/technical-tips/view/lamp-package-setup.html
i***@gmail.com
2016-06-24 14:18:38 UTC
Permalink
Post by Robin
Config: Apache/2.2.17, name-based virtual hosts.
What on earth is that gobbledy-gook supposed to mean?
I presume "the value of the first defined virtual host (the default
host)" should properly say "the value [of KeepAliveTimeout] IN the first
defined virtual host (the default host)", (a vhost does not have a
"value") and "The other values will be ignored" means "values [of
KeepAliveTimeout] in other [subsequently defined] vhosts will be ignored".
Hey

You probably need to create a single default virtual host for <your server IP>:80 and add your KeepAliveTimeout directive there.

Apache will use that first defined virtual host settings for the server-wide settings so far I know.

I can't check it right now but I think that will be the solution of your issue.

You can also take a look here for some Apache tweaks too, it may help: https://serversuit.com/community/technical-tips/view/lamp-package-setup.html
i***@gmail.com
2016-06-24 14:22:15 UTC
Permalink
Post by Robin
Config: Apache/2.2.17, name-based virtual hosts.
What on earth is that gobbledy-gook supposed to mean?
I presume "the value of the first defined virtual host (the default
host)" should properly say "the value [of KeepAliveTimeout] IN the first
defined virtual host (the default host)", (a vhost does not have a
"value") and "The other values will be ignored" means "values [of
KeepAliveTimeout] in other [subsequently defined] vhosts will be ignored".
Hey

You probably need to create a single default virtual host for <your server IP>:80 and add your KeepAliveTimeout directive there.

Apache will use that first defined virtual host settings for the server-wide settings so far I know.

I can't check it right now but I think that will be the solution of your issue.

You can also take a look here for some Apache tweaks too, it may help: https://serversuit.com/community/technical-tips/view/lamp-package-setup.html
Loading...