1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to achieve Keep-Alive for all elements?

Discussion in 'Apache' started by postcd, May 12, 2014.

  1. #1
    Hello,

    it appears some elements of the ICPH webpage have keep-alive and some not.

    I want to ask how to achieve all are loaded with keep-alive?
    SEMrush
    htaccess contains:
    thx
     
    postcd, May 12, 2014 IP
    SEMrush
  2. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    413
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #2
    For the same, we'll have to enable the KeepAlive & to enable the KeepAlive, we just need to enable it in the config file of Apache and for any custom portal we can then have the required module in the .htaccess file using the following paramters in the .htaccess

    <ifModule mod_headers.c>
    Header set Connection keep-alive
    </ifModule>

    Hope it helps!
     
    hostechsupport, May 13, 2014 IP
  3. postcd

    postcd Well-Known Member

    Messages:
    1,015
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #3
    Please what should i add to the APache config file? What do you suggest please?
     
    postcd, May 13, 2014 IP
  4. kalseo

    kalseo Active Member

    Messages:
    733
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #4
    Probably the best is to contact your hosting support. Module might be missing or misconfigured.
     
    kalseo, May 14, 2014 IP
  5. postcd

    postcd Well-Known Member

    Messages:
    1,015
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #5
    Im server owner and i have unmanaged service. If anyone can suggest what to add into httpd.conf, i thank you in advance.
     
    postcd, May 14, 2014 IP
  6. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    413
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #6
    KeepAlive is a server variable located in your configuration file. For Apache, its usually under the path /etc/httpd/conf/httpd.conf
    Applying KeepAlive settings on your server
    This should cover the most common cases. Login to your server via SSH and edit in the modification:

    1
    2
    3
    cd /etc/httpd/conf/httpd
    cp httpd.conf http.conf.bak
    nano httpd.conf
    Press ctrl+W and do a search for ‘KeepAlive’ to jump to it quickly.

    1
    2
    KeepAlive ON
    KeepAliveTimeout X
    Replace “X” with the number you came up with in the process above.
     
    hostechsupport, May 15, 2014 IP
  7. postcd

    postcd Well-Known Member

    Messages:
    1,015
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #7
    I have KeppAlive On ; Keep-Alive Timeout 6 ; Max Keep-Alive Requests 100
    but it still appears some local js and css elements still no keep alive on website (checked by webpagetest.org)
     
    postcd, May 15, 2014 IP