Results 1 to 2 of 2

Thread: How to enable KeepAlive in apache 2?

  1. #1

    Default How to enable KeepAlive in apache 2?

    The KeepAlive is core functionlity of the apache, this can be configured only in httpd.conf and can be customised for virtual host.
    Read more at

    core - Apache HTTP Server

    To enable the KeepAlive on the server

    1) open httpd.conf

    # vi /etc/httpd/conf/httpd.conf

    2) Put the following contents in httpd.conf but outside virtualhost

    KeepAlive On
    KeepAliveTimeout 5
    MaxKeepAliveRequests 100

    Save and quite

    3) restart httpd service

    # /etc/init.d/httpd restart

    To enable KeepAlive for particular VirtualHost

    1) Open httpd.conf and search virtualhost

    2) Edit virtualhost as given below

    <VirtualHost mydomain.com:80>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    DocumentRoot /home/mydom/mydomain.com
    KeepAlive On
    KeepAliveTimeout 5
    MaxKeepAliveRequests 100
    ------- rest contents ------
    </VirtualHost>

    save and quite

    3) Restart httpd service.

  2. #2
    Join Date
    Mar 2012
    Posts
    2

    Default

    What is Keep-Alive?
    The Keep-Alive extension to HTTP, as defined by the HTTP/1.1 draft, allows persistent connections. These long-lived HTTP sessions allow multiple requests to be send over the same TCP connection, and in some cases have been shown to result in an almost 50% speedup in latency times for HTML documents with lots of images.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •