Support » Plugin: Nginx Helper » purge does not work when using PHP-FPM with another user

  • I am using nginx helper 1.8.1 along with fastcgi caching and I noticed that the purging does not work. The problem here is that I have one PHP-FPM pool per website using another user account each. My nginx runs as www-data and so the files created by FastCGI caching also belongs to www-data. This means that the nginx helper can not delete (unlink) the cache file because that PHP-FPM runs as another user. Do you have any work around for that or any solution?

    Why not always use the /purge URL instead of unlinking files?

    Here would be the PHP-FPM error message just in case:

    2014/06/16 12:42:23 [error] 28902#0: *41796 FastCGI sent in stderr: "PHP message: PHP Warning: opendir(/var/run/nginx-cache/ failed to open dir: Permission denied in /var/www/ on line 686" while reading response header from upstream, client: XX.XX.XX.XX, server:, request: "GET /wp-admin/post.php?post=482&action=edit&message=1&nginx_helper_action=purge&nginx_helper_urls=all&_wpnonce=a382bcef22 HTTP/1.1", upstream: "fastcgi://unix:/var/lib/nginx/fastcgi/", host: "", referrer: ""

  • The topic ‘purge does not work when using PHP-FPM with another user’ is closed to new replies.