• Resolved qut1

    (@qut1)


    Hello great support !

    I have one site who don’t have cloudflare, working great with LD cache.

    Today I wanted to add LS Cache on two of my websites.
    As usual i installed the extension, enabled server side, but it doesn’t work. Here is my screenshot : https://i.postimg.cc/TGy4Rjhv/lscache.png

    Do you think this is because I have cloudflare enabled? In the past, I don’t remember it was a problem.

    Thx for your help !

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Please create a phpinfo page , and check if you see a server env

    $_SERVER['HTTP_X_LSCACHE']

    Best regards,

    Thread Starter qut1

    (@qut1)

    Hello @qtwrk, thx for your help !

    I created a file :

    <?php
    
    // Show all information, defaults to INFO_ALL
    phpinfo();
    
    ?>
    
    $_SERVER['HTTP_X_LSCACHE']

    The file, phpinfo give me this : https://ibb.co/KWp1dNy

    Do you see the problem ?

    Thx to you ! ??

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Yeah … you should be able to see an entry like this

    View post on imgur.com

    but you didn’t , that’s the issue.

    I have a quick wordaround , please try add this into your .htaccess

    SetEnv LSWS_EDITION Openlitespeed 
    SetEnv X-LSCACHE on

    and see how it goes.

    Best regards,

    Thread Starter qut1

    (@qut1)

    Hello @qtwrk

    With these two new lines in my htacces, I no longer have the message that LS Cache is no longer available. So on paper it’s supposed to work. Can you tell me how to check ?

    Here is my HTACCES in case you see if something is blocking here …

    # LS CACHE LIGNE FORUM
    SetEnv LSWS_EDITION Openlitespeed
    SetEnv X-LSCACHE on
    
    # BEGIN LSCACHE
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* - [E=Cache-Control:no-autoflush]
    
    ### marker CACHE RESOURCE start ###
    RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
    ### marker CACHE RESOURCE end ###
    
    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
    ### marker FAVICON end ###
    
    ### marker DROPQS start ###
    CacheKeyModify -qs:fbclid
    CacheKeyModify -qs:gclid
    CacheKeyModify -qs:utm*
    CacheKeyModify -qs:_ga
    ### marker DROPQS end ###
    
    </IfModule>
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    # END LSCACHE
    # BEGIN NON_LSCACHE
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    # END NON_LSCACHE
    # o2s WpTiger Begin - Dont edit - Ne pas modifier - blockXmlrpc
    # Bloque les accès sur le fichier xmlrpc
    <Files xmlrpc.php>
    order deny,allow
    deny from all
    </Files>
    # o2s WpTiger End - Dont edit - Ne pas modifier - blockXmlrpc
    # o2s WpTiger Begin - Dont edit - Ne pas modifier - blockErrorLogFiles
    # Bloque l'accès aux fichiers error_log qui contient les erreurs PHP
    <Files ~ "error_log">
        Deny from all
    </Files>
    # o2s WpTiger End - Dont edit - Ne pas modifier - blockErrorLogFiles
    # o2s WpTiger Begin - Dont edit - Ne pas modifier - forceHttps
    # Force le HTTPS
    RewriteEngine On 
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTPS} !on
    RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    # o2s WpTiger End - Dont edit - Ne pas modifier - forceHttps
    # o2s WpTiger Begin - Dont edit - Ne pas modifier - blockSqlDownload
    <Files ~ "\.(sql\.gz|sql\.zip|sql)$">
        Deny from all
    </Files>
    # o2s WpTiger End - Dont edit - Ne pas modifier - blockSqlDownload
    # o2s WpTiger Begin - Dont edit - Ne pas modifier - blockReadmeFiles
    # Bloque l'accès aux fichiers readme.html et license.txt
    <Files "readme.html|license.txt">
        Deny from all
    </Files>
    # o2s WpTiger End - Dont edit - Ne pas modifier - blockReadmeFiles
    # o2s WpTiger Begin - Dont edit - Ne pas modifier - commentSpam
    # Bloque l'accès aux commentaires pour les navigateurs sans useragent ou sans referer
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
    RewriteCond %{HTTP_REFERER} !.www.tewitec.com.* [OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule .* - [F,L]
    </IfModule>
    # o2s WpTiger End - Dont edit - Ne pas modifier - commentSpam
    # o2s WpTiger Begin - Dont edit - Ne pas modifier - authorLink
    # Masque l'identifiant d'un auteur
    <IfModule mod_rewrite.c>
    RewriteCond %{QUERY_STRING} ^author=([0-9]*)
    RewriteRule .* - [F,L]
    </IfModule>
    # o2s WpTiger End - Dont edit - Ne pas modifier - authorLink
    # o2s WpTiger Begin - Dont edit - Ne pas modifier - directoryListing
    # Empeche le listing des fichiers dans les dossiers sans index
    Options All -Indexes
    # o2s WpTiger End - Dont edit - Ne pas modifier - directoryListing
    # BEGIN WordPress
    # Las directivas (líneas) entre <code>BEGIN WordPress</code> y <code>END WordPress</code> se generan dinámicamente
    # , y solo se deberían modificar mediante filtros de WordPress.
    # Cualquier cambio en las directivas que hay entre esos marcadores se sobreescribirán.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Thank you for your work ! ??

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    You can check in browser dev tool –> network —> response header

    you should see a header like “x-litespeed-cache: miss/hit” , this indicates cache is working.

    Best regards,

    Thread Starter qut1

    (@qut1)

    Hello @qtwrk

    I checked, and I don’t have your line, I have this :

    alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
    cf-cache-status: DYNAMIC
    cf-ray: 5bacd18d7c0d0887-CDG
    cf-request-id: 043fe14c6b000008876cbea200000001
    content-encoding: br
    content-type: text/html; charset=UTF-8
    date: Thu, 30 Jul 2020 05:53:19 GMT
    expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    link: <https://www.x.com/wp-json/>; rel="https://api.w.org/", <https://www.x.com/>; rel=shortlink
    server: cloudflare
    status: 200
    vary: Accept-Encoding
    x-litespeed-cache-control: public,max-age=604800
    x-litespeed-tag: 97f_HTTP.200,97f_front,97f_URL.6666cd76f96956469e7be39d750cc7d9,97f_F,97f_Po.22,97f_PGS,97f_
    x-powered-by: PHP/7.4.8

    Its maybe because of cloudflare ? But LS Cache working anyway ?

    Thx !

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    No , if you refresh this page twice or thrice, and still not seeing x-litespeed-cache: miss/hit header , then please contact your hosting provider , there is some problem with your cache root set up.

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I’m going to mark this topic “Resolved”, due to lack of activity.

    If you still need help, please feel free to re-open it.

    Best regards,

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘LS Cache not detected… Because of cloudflare ?’ is closed to new replies.