I've been trying to enable Keep Alive on my https site with no luck. Is it possible? Sometimes I see on my test page it says "connection closed."

Here's what I have in my htaccess right now that doesn't seem to work:

Header set Connection keep-alive
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15 
Connection: Keep-Alive  

Any suggestions?

  • "doesn't seem to work" - If you had that in an .htaccess file I would have expected to see a 500 Internal Server Error (in which case, check your server's error log), if it did anything at all.
    – MrWhite
    Aug 21, 2016 at 15:56

1 Answer 1


The KeepAlive directive is perfectly valid for HTTPS; in fact it is most advantageous with HTTPS. On the other hand, the valid context of the KeepAlive directive is "server config, virtual host." This means that you cannot do this in an .htaccess file.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .