Skip to content

Wordpress plugins for Nginx cannot purge fast-cgi cache #9

@rija

Description

@rija

For security reasons, php-fpm and nginx run under different users so Nginx-Cache and Nginx-Helper plugins cannot delete the cache on the filesystem.
This is not desirable anyway because it creates an attack opportunity on the filesystems form Wordpress.

A better approach is to use a location-based approach, something like:

 location ~ /purge(/.*) {
            allow              127.0.0.1;
            deny               all;
            fastcgi_cache_purge  tmpcache $1$is_args$args;
        }

nginx is already compile with ngx_cache_purge.

Only Nginx-Helper supports this in theory but last time I tried it wasn't reliable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions