Cachify Plugin – 504 Gateway Timeout error

Home Forums BulletProof Security Free Cachify Plugin – 504 Gateway Timeout error

This topic contains 8 replies, has 2 voices, and was last updated by  AITpro Admin 1 year, 1 month ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #32657

    Vintagepornbay.com
    Participant

    Hi I want to use Cachify plugin together with BPS.  It has own htaccess codes:
    https://github.com/pluginkollektiv/cachify/wiki/en-Cache-Methods#hard-disk-hdd-cache

    However it seems working with BPS even with BPS’s custom speed boost cache code. But I am really not sure if its working or not. Do anyone know is there any conflict between them or how can I install cachify successfully with BPS?

    I think my 504 error causing by them:
    I get
    “504 Gateway Time-out The server didn’t respond in time.” error if I start playing video in our wordpress blog post then try to move another post. Why would this happen?
    If I dont play video its successfully moving through the pages. But when the video started then it gives 504 error. Then If I refresh the page it brings the page successfully but moving isn’t working.

    Why would streaming videos would cause this?

    #32658

    AITpro Admin
    Keymaster

    I don’t have any experience with the Cachify Plugin.  So I am not sure what would cause a 504 Gateway Timeout error with that plugin.  You should contact the Cachify plugin author about that problem.  When I check the htaccess caching options this plugin has you would use the htaccess code that comes with Cachify instead of the BPS Speed Boost cache code since the code is redundant.  The only caching plugin that we recommend is Comet Cache:  https://wordpress.org/plugins/comet-cache/  In our opinion it is the best WordPress caching plugin there is.

    #32663

    Vintagepornbay.com
    Participant

    When I use cachify plugin’s htaccess code instead of bps the site goes internal server error why?

    How can I add this code without going into 500 internal server error while using bps security:

    # BEGINN CACHIFY
    <IfModule mod_rewrite.c>
        # ENGINE ON
        RewriteEngine On
    
        # GZIP FILE
        <IfModule mod_mime.c>
            RewriteCond %{REQUEST_URI} /$
            RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-content/cache)/.*
            RewriteCond %{REQUEST_METHOD} !=POST
            RewriteCond %{QUERY_STRING} =""
            RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
            RewriteCond %{HTTP:Accept-Encoding} gzip
            RewriteCond %{DOCUMENT_ROOT}/path to/wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html.gz -f
            RewriteRule ^(.*) /path to/wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html.gz [L]
    
            AddType text/html .gz
            AddEncoding gzip .gz
        </IfModule>
    
        # HTML FILE
        RewriteCond %{REQUEST_URI} /$
        RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-content/cache)/.*
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
        RewriteCond %{DOCUMENT_ROOT}/path to/wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html -f
        RewriteRule ^(.*) /path to/wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html [L]
    </IfModule>
    # END CACHIFY
    #32670

    AITpro Admin
    Keymaster

    I downloaded, installed and tested the Cachify plugin and it worked fine on my testing site with no problems or errors.  See the Plugin Author’s notes from his Github page that I have copied below for possible additional customizations that you will need to make to your Cachify htaccess code.

    Has a minify option > Cache minify > choose the No minify option setting.

    Minification breaks the BPS Pro Plugin Firewall and lots of other things in other plugins.  Automated Minification should never be used for any reason since it does not actually improve website performance and usually just break things.  If you choose to use Cachify Minification then you will need to deactivate the BPS Pro Plugin Firewall since minification breaks the BPS Pro Plugin Firewall.

    The Cachify plugin does not add any code in the wp-config.php file when using the Cache method > Hard Disk
    I did not test the Cache method > Database – Database caching is a very bad idea and should not be used for any reason.
    After clicking the Save Changes button the Cachify plugin told me to go to the Setup tab to get the Cachify htaccess code.

    This is the code that was created by Cachify for my XAMPP testing site:
    Note: The Cachify plugin probably creates custom htaccess code for each individual server/website, which is what the BPS plugin does. So you want to use the Cachify plugin htaccess code that Cachify generates for your server/website on the Cachify Setup tab page and not the code below that was generated for my XAMPP testing website.

    # BEGIN CACHIFY
    <IfModule mod_rewrite.c>
    # ENGINE ON
    RewriteEngine on
    # set hostname directory
    RewriteCond %{HTTPS} on
    RewriteRule .* - [E=CACHIFY_HOST:https-%{HTTP_HOST}]
    RewriteCond %{HTTPS} off
    RewriteRule .* - [E=CACHIFY_HOST:%{HTTP_HOST}]
    
    # set subdirectory
    RewriteCond %{REQUEST_URI} /$
    RewriteRule .* - [E=CACHIFY_DIR:%{REQUEST_URI}]
    RewriteCond %{REQUEST_URI} ^$
    RewriteRule .* - [E=CACHIFY_DIR:/]
    
    # gzip
    RewriteRule .* - [E=CACHIFY_SUFFIX:]
    <IfModule mod_mime.c>
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=CACHIFY_SUFFIX:.gz]
    AddType text/html .gz
    AddEncoding gzip .gz
    </IfModule>
    
    # Main Rules
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-content/cache)/.*
    RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
    RewriteCond C:\xampp\htdocs12\demo5/wp-content/cache/cachify/%{ENV:CACHIFY_HOST}%{ENV:CACHIFY_DIR}index.html -f
    RewriteRule ^(.*) /wp-content/cache/cachify/%{ENV:CACHIFY_HOST}%{ENV:CACHIFY_DIR}index.html%{ENV:CACHIFY_SUFFIX} [L]
    </IfModule>
    # END CACHIFY

    I copied the Cachify htaccess code to this BPS Root Custom Code text box:  1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    Clicked the Save Root Custom Code button.
    Activated Root Folder BulletProof Mode.

    Plugin Author’s notes from his Github page:
    https://github.com/pluginkollektiv/cachify/wiki/en-Cache-Methods#hard-disk-hdd-cache

    Notes about .htaccess customizations

    • Within the .htaccess, the above extension has a higher priority and must be placed above the WordPress Rewrite rules (marked mostly by # BEGIN WordPress … # END WordPress).
    • If the website is only accessible via SSL/TLS, you have to edit /wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html to /wp-content/cache/cachify/https-%{HTTP_HOST}%{REQUEST_URI}index.html
    • Some (few) hosters (like domainFACTORY and 1und1) do not provide the Apache variable %{DOCUMENT_ROOT}. This results in an incomplete file path. In such cases, please manually prepend the document path (instead of a variable), see instructions DOCUMENT_ROOT in .htaccess with server path replace.
    • Changes to the .htaccess file can not be made if PHP is run as fcgi.
    • If there are partial errors in the redirects within the blog, the shutdown of the Apache Content Cache can help.
    • If the WPTouch plugin (or another mobile plugin) is installed in WordPress, RewriteRules must be extended, see Gist.

     

    #32690

    Vintagepornbay.com
    Participant

    its not automatically generates htaccess code on my server it just shows this message when I adjust it to hdd cache and 72 hours:

    The server configuration file (e.g. .htaccess) needs to be adjusted [?]

    So I think this requires adding additional htaccess code which is described in github of that plugin.
    But when I add that code into bps 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    then the site goes 500 internal server error.

    #32691

    AITpro Admin
    Keymaster

    Ok then either the Cachify code is bad/invalid or the Cachify htaccess code just does not work on your server/website.  Since I tested Cachify plugin on a testing site and it worked fine without any errors then that leaves you with contacting the Cachify plugin author to get additional help for the Cachify plugin or contacting your host for help.  Since we only support the BPS and BPS Pro plugins then we cannot offer any additional support for any other plugins besides our plugins.

    #32709

    AITpro Admin
    Keymaster

    Actually the Cachify plugin did not work correctly on my testing site.  I did not see a 500 error, but as soon as I logged out of the testing site the site would no longer load and I saw an “Invalid Site Path” error.  So maybe the Cachify plugin is just broken in general?

    #32710

    Vintagepornbay.com
    Participant

    But a lot of people using this plugin i think there is a conflict with bps free and pro.

    When i add cachify code into the htaccess the site goes internal server error.

    Is there any plugin which can be okay with bps free and pro and provides hdd cache like cachify?

    #32712

    AITpro Admin
    Keymaster

    The problems with the Cachify plugin do not have anything to do with BPS or BPS Pro.  There is a problem with the Cachify htaccess code and maybe also the Cachify plugin PHP code itself.  If you want to confirm that then uninstall the BPS plugin using the “complete uninstall option”.  Then install and setup the Cachify plugin without the BPS plugin installed.  Note: If you created any custom code in BPS Custom Code then use the Custom Code Export tool before uninstalling the BPS plugin so that you can Import your custom code into BPS Custom Code after testing.

    The only caching plugin that we recommend is Comet Cache:  https://wordpress.org/plugins/comet-cache/  In our opinion it is the best WordPress caching plugin there is.  BPS and BPS Pro work with all other “working” caching plugins (W3TC, WPSC, etc etc etc).

    What the Cachify plugin calls HDD File caching is actually technically correctly called Static page caching, which is what the Comet Cache plugin primarily does and it does Static page caching better than any other WordPress caching plugin that we have ever tested.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.