• Hi!

    I setup the plugin to work with the fastcgi_cache_purge module and it is not purging the cache. I’ve found that this is because the open_basedir setting enabled:

    is_dir(): open_basedir restriction in effect. File(/var/run/nginx-cache) is not within the allowed path(s): (...) /wp-content/plugins/nginx-helper/admin/class-purger.php on line 1228

    But why is trying to perform filesystem actions when it should just make a GET request?

    I know I can add the nginx-cache folder to the open_basedir paths, but it will be nice to avoid need doing it when you’re using the module method.

    Thanks so much for this plugin!

    PS: I’ve tried the URL mysite/purge/ and works good.

Viewing 1 replies (of 1 total)
  • Thread Starter gahia

    (@gahia)

    After checking the code, I’ve realized that this was affecting only to the Purge All method as it’s ignoring the setting to use the module and trying to remove the entire cache directly by the filesystem. This means it will never works unless you add the folder to its allowed paths and grant permissions to that folder.

    This is may be ok for a single WordPress installation but I you looks for a safe environment it will be better to keep the open_basedir policy enabled and don’t grant any permissions to users for system folders.

    Then I’ve opted to install the a newer “version” or the module that allow the use of wildcards. I understand that this feature was missing form the original module you recommend and it doesn’t make possible to clear all cache unless you do it through the filesystem.

    It will be nice if you can make this small changes in the plugin:

    1) Purge all though the ngx_cache_purge module
    2) Custom purge accepting wildcards

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘fastcgi_cache_purge with open_basedir issue’ is closed to new replies.