Title: robertchen617's Replies | WordPress.org

---

# robertchen617

  [  ](https://wordpress.org/support/users/robertchen617/)

 *   [Profile](https://wordpress.org/support/users/robertchen617/)
 *   [Topics Started](https://wordpress.org/support/users/robertchen617/topics/)
 *   [Replies Created](https://wordpress.org/support/users/robertchen617/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/robertchen617/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/robertchen617/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/robertchen617/engagements/)
 *   [Favorites](https://wordpress.org/support/users/robertchen617/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Cache Sniper for Nginx] Not working](https://wordpress.org/support/topic/not-working-2714/)
 *  Plugin Contributor [robertchen617](https://wordpress.org/support/users/robertchen617/)
 * (@robertchen617)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/not-working-2714/#post-10881561)
 * Hello [@tobias992](https://wordpress.org/support/users/tobias992/),
 * To make sure I understand the question, you have Nginx running as `www-data`.
   And you have multiple websites, each running as a separate PHP user. The PHP 
   users are unable to clear the cache. This is because the cache folder and objects
   have `700` permissions and are owned by `www-data`. While configurations where
   PHP is running as the same user as Nginx conveniently work, PHP has no way to
   delete the cache the moment it runs as another user.
 * I don’t have an answer for you right now. The most useful thing I could find 
   when researching this was this article: [https://github.com/rtCamp/nginx-helper/issues/63](https://github.com/rtCamp/nginx-helper/issues/63).
   They mention a `set $user` syntax for Nginx, but I haven’t tried it personally.
 * Let’s keep this ticket open. In the meantime, there’s an approach I would like
   to try out. It might take some time to implement this approach, but I can keep
   you posted.
 * Thanks,
    Robert
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Cache Sniper for Nginx] Multisite Compatible](https://wordpress.org/support/topic/multisite-compatible-144/)
 *  Plugin Contributor [robertchen617](https://wordpress.org/support/users/robertchen617/)
 * (@robertchen617)
 * [8 years ago](https://wordpress.org/support/topic/multisite-compatible-144/#post-10775009)
 * Yeah, the MD5 hash levels 1:2 (i.e. /e/3i/e3i445873845) makes it really hard 
   to keep sites separate.
 * It might be easier to just have a separate Nginx virtual host conf for each website(
   regardless of whether you’re using multisite or multiple site WordPress). That
   way, you can leverage the `keys_zone` to separate each website into different
   folder paths.
 * If there’s another way of doing this, I’m not aware of it.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Cache Sniper for Nginx] Multisite Compatible](https://wordpress.org/support/topic/multisite-compatible-144/)
 *  Plugin Contributor [robertchen617](https://wordpress.org/support/users/robertchen617/)
 * (@robertchen617)
 * [8 years ago](https://wordpress.org/support/topic/multisite-compatible-144/#post-10765107)
 * Unfortunately, we haven’t really tested this plugin with multisite (that is, 
   where multiple sites are using the same WordPress core).
 * Are you currently using FastCGI cache with your current set up? If so, are you
   able to separate each site’s cache files into their own folders?
 * Thanks,
    Robert
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Cache Sniper for Nginx] Multisite Compatible](https://wordpress.org/support/topic/multisite-compatible-144/)
 *  Plugin Contributor [robertchen617](https://wordpress.org/support/users/robertchen617/)
 * (@robertchen617)
 * [8 years ago](https://wordpress.org/support/topic/multisite-compatible-144/#post-10760462)
 * Hi [@ffemtkl](https://wordpress.org/support/users/ffemtkl/),
 * To set up multisite with FastCGI Cache, one site will be configured like this:
 *     ```
       fastcgi_cache_path /var/lib/nginx/siteone levels=1:2 keys_zone=SITEONE:1440m;
   
       server {
           location ~ \.php$ {
               fastcgi_cache SITEONE;
           }
       }
       ```
   
 * and the second site like this:
 *     ```
       fastcgi_cache_path /var/lib/nginx/sitetwo levels=1:2 keys_zone=SITETWO:1440m;
   
       server {
           location ~ \.php$ {
               fastcgi_cache SITETWO;
           }
       }
       ```
   
 * Within the plugin settings for site one, make sure the `CachePath` is set to `/
   var/lib/nginx/siteone`
 * Likewise for site two, set the `CachePath` to `/var/lib/nginx/sitetwo`
 * Hope this helps.
    -  This reply was modified 8 years ago by [robertchen617](https://wordpress.org/support/users/robertchen617/).
      Reason: formatting code block

Viewing 4 replies - 1 through 4 (of 4 total)