vB seo + litespeed cache

Discussion in 'LiteSpeed Cache' started by NiteWave, Mar 22, 2011.

  1. Yogesh Sarkar

    Yogesh Sarkar Banned

    Not really, it works alright. Have been running it for almost couple of weeks now.
  2. Chris

    Chris New Member

    I'm running it on 3.8 just fine.

    I don't see where 4.2 would run into any issues.
  3. eagle eyes

    eagle eyes New Member

    Can i see the live performance of vb litespeed cache?

    What are the negatives? Guests can't see the updated pages?
  4. NiteWave

    NiteWave Administrator

    yes. if you cache 2 minutes, then guest user may not read updated page in recent 2 minutes. usually it's acceptable.
  5. Yogesh Sarkar

    Yogesh Sarkar Banned

    Not able to get this to work on vb 4.2.1 and vbseo 3.6.1.

    Followed all the steps mentioned in the wiki here, http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:litespeed:cache:vbulletin

    And in case of headers, this is what I am getting

    Here are the cache settings in Litespeed admin panel

    Untitled-1.jpg
  6. NiteWave

    NiteWave Administrator

    Max Object Size: 1024
    is too low, mean 1K, maybe you want 1024K

    Storage Path: /tmp/lshttpd
    better change to other path, for example /tmp/cache
    under /tmp/lshttpd, litespeed process store some internal data which required to run properly.

    your cache clean up script won't work if you try to delete these internal data, or litespeed may stop working correctly.
    Last edited: Jun 26, 2013
  7. Yogesh Sarkar

    Yogesh Sarkar Banned

    Thank you for the prompt reply. Changed the value to 1024000 and it is still not working.

    Also any idea why this is showing for back date? "Expires: Thu, 19 Nov 1981 08:52:00 GMT"

    I will ask get the litespeed cache moved to another folder.
  8. Yogesh Sarkar

    Yogesh Sarkar Banned

    Ok I got the cache folder moved to /tmp/cache and added the following entry in crontab

    And it is giving me following error

    Also now the server is showing a few cache hits, but whenever I test, it shows nothing and also as you can see, cached hits are minuscule.

    Untitled-1.jpg
  9. NiteWave

    NiteWave Administrator

    should be "-delete" not ".delete"

    you've made a few typos in just a few posts, so I guess you're a careless person :)

    it may be other typos or small mistakes which make the cache rate low ...

    to save time, you can PM me the access to the server, check all related possible mistakes, and finally post the result to the forum.
  10. Yogesh Sarkar

    Yogesh Sarkar Banned

    I was copying and pasting from notepad to putty and that for some reason was changing - to .

    Anyways, I am sending you a pm with the login access.
  11. NiteWave

    NiteWave Administrator

    I have updated the .htaccess
    original one save as .htaccess.000

    the cache hit rate has raised from 0.02% to 9.79%

    please test at your end:
    1)is the forum's response faster than before ?
    2)can you easily test cache hit a page now ?
    3)note: the cache is for guest(public cache), if you logged in as a user, you shouldn't see any page which has been cached.
    4)any comments about the change of the .htaccess ?

    Note: your cache folder is to be full:
    ~>du -sh /tmp/cache
    1.2G /tmp/cache
    ~>df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda7 1.9G 1.3G 492M 73% /tmp

    better to set it to other folder not under /tmp
    Last edited: Jun 26, 2013
  12. Yogesh Sarkar

    Yogesh Sarkar Banned

    Thank you :).

    Getting proper hit now and I am testing with webpagetest.org, so cached pages are served for it.

    Response for the most part seems same for the guest, maybe it is the latency between the webpagetest servers and ours.

    Saw the changes in the .htaccess and realized my mistake for not changing the vbseologged in to correct value :).
  13. jdeg

    jdeg New Member

    now that vbseo is no longer supported, has anyone gotten this to work with DESEO? Just curious...
  14. Bashed

    Bashed New Member

    Same here. I'm using dbseo and I attempted to use the rules mentioned in this thread.

    My htaccess is (running VBulletin 4.2x)

    Code:
    RewriteEngine On
    
    RewriteBase /
    
    ## Rewrites
    <ifmodule mod_rewrite.c>
       RewriteEngine on
       Options +FollowSymlinks
    
       RewriteCond %{REQUEST_FILENAME} -s [OR]
       RewriteCond %{REQUEST_FILENAME} -l [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       RewriteRule ^.*$ - [NC,L]
    
       # Media Library
       ReWriteRule ^media/m(\d+).*/tags$ media.php?do=tags_edit&mid=$1 [QSA]
       ReWriteRule ^media/m(\d+).*/edit$ media.php?do=details_edit&mid=$1 [QSA]
       ReWriteRule ^media/m(\d+).*/report$ media.php?do=report&mid=$1 [QSA]
       ReWriteRule ^media/m(\d+).*/c(\d+)$ media.php?do=comment_edit&cmt=$2 [QSA]
       ReWriteRule ^media/m(\d+).*/p(\d+).*$ media.php?do=details&mid=$1&pid=$2 [QSA]
       ReWriteRule ^media/m(\d+).* media.php?do=details&mid=$1 [QSA]
       ReWriteRule ^media/p(\d+).*/edit$ media.php?do=playlist_edit&pid=$1 [QSA]
       ReWriteRule ^media/p(\d+).* media.php?do=playlist&pid=$1 [QSA]
       ReWriteRule ^media/c(\d+).* media.php?do=category&cid=$1 [QSA]
       ReWriteRule ^media/u(\d+).* media.php?do=user&uid=$1 [QSA]
       ReWriteRule ^media/tag/(.*) media.php?do=tag&tid=$1 [QSA]
       ReWriteRule ^media/results/(.*) media.php?do=results&query=$1 [QSA]
       ReWriteRule ^media/advresults/(.*) media.php?do=advresults&query=$1 [QSA]
       ReWriteRule ^media/letter/(.*) media.php?do=letter&query=$1 [QSA]
       ReWriteRule ^media/browse.* media.php?do=browse [QSA]
       ReWriteRule ^media/search.* media.php?do=search [QSA]
       ReWriteRule ^media/random.* media.php?do=random [QSA]
       ReWriteRule ^media/submit.* media.php?do=submit [QSA]
       ReWriteRule ^media/tagcloud.* media.php?do=tagcloud [QSA]
       ReWriteRule ^media/playlists.* media.php?do=playlists [QSA]
       ReWriteRule ^media/pcreate.* media.php?do=playlists_create [QSA]
       ReWriteRule ^media/pmine.* media.php?do=playlists_mine [QSA]
       ReWriteRule ^media/favorites.* media.php?do=favorites [QSA]
       ReWriteRule ^media/subscriptions.* media.php?do=subscriptions [QSA]
       ReWriteRule ^media/admin/edit/s(\d+).* media.php?do=admin_host_edit&sid=$1 [QSA]
       ReWriteRule ^media/admin/delete/s(\d+).* media.php?do=admin_host_delete&sid=$1 [QSA]
       ReWriteRule ^media/admin/export/s(\d+).* media.php?do=admin_host_export&sid=$1 [QSA]
       ReWriteRule ^media/admin/(\w+).* media.php?do=admin_$1 [QSA]
    
       # Media Library from Video Directory
       RewriteCond %{QUERY_STRING} do=viewdetails&videoid=(\d+)
       RewriteRule ^video\.php$ media.php?do=details&mid=%1
       RewriteCond %{QUERY_STRING} viewcategory&categoryid=(\d+)
       RewriteRule ^video\.php$ media.php?do=category&cid=%1
       RewriteCond %{QUERY_STRING} viewuser&userid=(\d+)
       RewriteRule ^video\.php$ media.php?do=user&uid=%1
       RewriteCond %{QUERY_STRING} viewtag&tag=(.*)
       RewriteRule ^video\.php$ media.php?do=tag&tid=%1
       ReWriteRule ^video\.php$ media.php
    
       # Forum
       RewriteRule ^threads/.* showthread.php [QSA]
       RewriteRule ^forums/.* forumdisplay.php [QSA]
       RewriteRule ^members/.* member.php [QSA]
       RewriteRule ^blogs/.* blog.php [QSA]
       ReWriteRule ^entries/.* entry.php [QSA]
    
       RewriteCond %{REQUEST_FILENAME} -s [OR]
       RewriteCond %{REQUEST_FILENAME} -l [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       RewriteRule ^.*$ - [NC,L]
    
       # MVC
       RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
       
    </ifmodule>
    
    RewriteCond %{HTTP_HOST} !^www\.talkjesus\.com
    RewriteRule (.*)  http://www.talkjesus.com/$1 [L,R=301]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modscp/|cron)
    RewriteRule ^((archive/)?(.*\.php(/.*)?)?)$ dbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modscp|clientscript|cpstyles|images|gallery)/
    RewriteRule ^(.+)$ dbseo.php [QSA]
    
    #rules for litespeed cache:
    RewriteCond %{HTTP_COOKIE} !dbseo_loggedin=yes
    RewriteCond %{HTTP_COOKIE} !bb_userid=
    RewriteCond %{HTTP_COOKIE} !bb_password=
    #RewriteCond %{ORG_REQ_URI} ^/(index\.php|)$
    RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule (.*) - [L,E=Cache-Control:max-age=60]
    
    ## Expires
    <ifModule mod_expires.c>
       ExpiresActive On
       ExpiresByType image/gif "access plus 1 year"
       ExpiresByType image/jpeg "access plus 1 year"
       ExpiresByType image/png "access plus 1 year"
       ExpiresByType text/css "access plus 1 year"
       ExpiresByType text/javascript "access plus 1 year"
       ExpiresByType application/javascript "access plus 1 year"
       ExpiresByType application/x-javascript "access plus 1 year"
    </ifModule>
    
    #Deny attempts to view the Htaccess file.
    <Files .htaccess>
    Order allow,deny
    Deny from all
    </Files>
    RewriteCond %{HTTP_HOST} ^talkjesus\.org$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.talkjesus\.org$
    RewriteRule ^/?$ "http\:\/\/www\.talkjesus\.com\/" [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^talkjesus\.co\.uk$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.talkjesus\.co\.uk$
    RewriteRule ^/?$ "http\:\/\/www\.talkjesus\.com\/" [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^talkjesus\.us$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.talkjesus\.us$
    RewriteRule ^/?$ "http\:\/\/www\.talkjesus\.com\/" [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^talkjesus\.info$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.talkjesus\.info$
    RewriteRule ^/?$ "http\:\/\/www\.talkjesus\.com\/" [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^talkjesus\.mobi$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.talkjesus\.mobi$
    RewriteRule ^/?$ "http\:\/\/www\.talkjesus\.com\/" [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^talkjesus\.net$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.talkjesus\.net$
    RewriteRule ^/?$ "http\:\/\/www\.talkjesus\.com\/" [R=301,L]
    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>
    
    Is this ok?
  15. NiteWave

    NiteWave Administrator

    the rewriterule for cache looks ok. but we have no experience about dbseo. rewrite rule just one part of whole cache mechanism.

    only you can test and confirm if the cache works -- if you've done the tests, please inform the community.

    is the previous issue gone after you removed a few lines of ExpiresByType ?

    and in the above rewrite rules, the last 301 redirect rules, should put at very beginning of .htaccess
  16. HotLink

    HotLink New Member

    I have purchase LS cache option and when i try to use your rewrite rules its lead 404 error pages :(
    What is the problem i have make every thing as you say .
  17. NiteWave

    NiteWave Administrator

    is your site vbseo ? have you followed any wiki page to enable lscache ?
  18. HotLink

    HotLink New Member

    i just edit the cache value in admin - server - cache to

    Code:
    Enable Cache  
    
    
    
    
    
    
        Yes
    Max Object Size  
    
    
    
    
        128000
    Cache Expire Time (seconds)  
    
    
    
    
        3600
    Cache Stale Age (seconds)  
    
    
    
    
        Not Set
    Cache Request with Query String  
    
    
    
    
        Yes
    Cache Request with Cookie  
    
    
    
    
        No
    Cache Response with Cookie  
    
    
    
    
        No
    Ignore Request Cache-Control  
    
    
    
    
        No
    Ignore Response Cache-Control  
    
    
    
    
        No
    Enable Private Cache  
    
    
    
    
    
    
    
        Yes
    Private Cache Expire Time (seconds)  
    
    
    
    
        120
    Do-Not-Cache URL   
    
    
           Edit
    Not Set
    Do-Not-Cache Domains   
    
    
    
    
           Edit
    Not Set
    and im using vbulletin 4.2.2 and vbseo vBSEO 3.6.1
  19. NiteWave

    NiteWave Administrator

Share This Page