1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Keep Alive

Discussion in 'XenForo Questions and Support' started by DRE, Feb 16, 2014.

  1. DRE

    DRE Well-Known Member

    What is Keep Alive? WebPageTest.org says I don't have Keep Alive Enabled.


    Xenforo 1.3 Beta 3.

    All addons disabled on my site.

    No social networking integration or buttons.

    No advertisements

    Default theme with nearly no edits.

    I asked my host and they said 'Keep alive is enabled in your server's configuration. If it's off, it's been disabled in your sites' .htaccess file, or otherwise in your code.'
  2. MattW

    MattW Well-Known Member

    It's an apache setting Dre.

    You can see if it's enabled by looking at the apache config in WHM.
  3. DRE

    DRE Well-Known Member

    Just like my host said, Keep Alive is on.

    Screen Shot 2014-02-16 at 5.21.39 PM.png

    What on my Xenforo installation is keeping it from showing that it's enabled?
  4. Null

    Null Well-Known Member

    Unless your server is under really heavy load, you should keep the Keep-Alive Timeout at 5 (default).

    Can you paste your .htaccess, httpd.conf and ssl.conf? I'm guessing there's a rouge 'nokeepalive' somewhere.

    Alternatively, you could try the following:
    cd /etc/apache2
    grep -Rni 'nokeepalive' *
    Last edited: Feb 17, 2014
  5. DRE

    DRE Well-Known Member

    RewriteEngine on 
    RewriteCond %{HTTP_USER_AGENT} ^Baiduspider [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^Sogou [NC]
    RewriteRule ^.*$ - [F]
    order allow,deny
    deny from 18blah blah
    deny from 22blah blah
    allow from all
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    <IfModule mod_rewrite.c>
      Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?8th.us [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?facebook.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?twitter.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif|bmp|tiff|pic|mp3|doc|xls|mpeg|mpg|ram|rm|wma|wav|asx|wmv|avi|mov|zip|rar|exe)$ http://i41.tinypic.com/2wq73lx.jpg [NC,R,L]
    RewriteEngine on
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://8th.us/$1 [R,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
  6. Null

    Null Well-Known Member

    @DRE, can you show me your httpd.conf and ssl.conf files, too?

    Or just run the grep command.
  7. DRE

    DRE Well-Known Member

  8. DRE

    DRE Well-Known Member

    Glad I'm not the only one who is having this issue.

    I've been reading a lot and I'm seeing that this Keep Alive issue is actually server related and not software related.


    "That means keep--alives are not really enabled. I'm partially convinced that hosting providers were doing that just so you thought it might be while still allowing them to disable it but when the browser sees that "close" it will close the connection.

    The keep-alives are generally controlled at the server level and not controllable in .htaccess. You'll need to reach out to your hosting provider."

    This guy says it may be related to SSL


    and this guy fixed it by editing his SSL v host file.


    More articles on this:



    Last edited: Feb 17, 2014
  9. DRE

    DRE Well-Known Member

  10. DRE

    DRE Well-Known Member

    Okay so WebPageTest.org has been giving me a False Positive because GTMetrix says Keep Alive is on.

    Guess I'll just move on to the next step, fixing First Byte Time.
  11. DRE

    DRE Well-Known Member

    Strange but Keep Alive is now showing on my WebPageTest.org score after I moved to LiteSpeed.

Share This Page