I have only acces to the php.ini
file and my good old .htaccess
file.
Where do I enable the Keep Alive setting?
( Im on a plesk 8.2 )
I have only acces to the php.ini
file and my good old .htaccess
file.
Where do I enable the Keep Alive setting?
( Im on a plesk 8.2 )
Which KeepAlive setting? If you are meaning whether the server supports persistent HTTP connections and how long the relevant timeouts are, then this is not something you can control from .htaccess or php.ini - it is something that can only be configured in the core Apache configuration files.
<ifModule mod_env.c>
SetEnv KeepAlive On
SetEnv KeepAliveTimeout 100
SetEnv MaxKeepAliveRequests 500
</ifModule>
<ifModule mod_headers.c>
Header unset Connection
Header set Connection keep-alive
Header unset Keep-Alive
Header set Keep-Alive timeout=100,max=500
</ifModule>
<?php
/* setting Apache */
apache_setenv("KeepAlive", "On");
apache_setenv("KeepAliveTimeout", "100");
apache_setenv("MaxKeepAliveRequests", "500");
/* setting headers */
header("Connection: keep-alive");
header("Keep-Alive: timeout=100, max=500");
?>