You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not have the ngx_cache_purge module, because it apparently would require uninstalling nginx and reinstalling, thus requiring my sys admin to re-do a lot of work we’ve done on that server. (and doesn’t that module require a nginx paid subscription ?)
So we chose the purge method of: ‘Delete local server cache files. Checks for matching cache file in RT_WP_NGINX_HELPER_CACHE_PATH.’
We set the path as /home/site-owner-user/nginx-cache/cache
Due to the virtualmin PHP setup, it created it's own PHP pool for the virtual server and therefore ran PHP under the site-owner-user. But NGINX uses the cache folder as user 'www-data', however this directory was not writable by other users. Therefore when wordpress tried to clear the cache, the folder could not be deleted and recreated.
I could fix this by manually changing the folder permissions, but when wordpress recreated the cache folder it would now be owned by the user 'classicwp' and NGINX could no longer write cache files to that location. When we tried to do a shared ‘group’ for them, nginx just ignored that. NGINX doesn't allow us to specify the file permissions for the cache files it creates. They're stuck at a level that does not allow the group to write.
We CAN make it work when we change the PHP user to www-data (same as nginx), but this raises security problems if 20 wordpress clients all run as that same nginx user, www-data.
So, what is the solution?
Thanks so much for any ideas
The text was updated successfully, but these errors were encountered:
I do not have the ngx_cache_purge module, because it apparently would require uninstalling nginx and reinstalling, thus requiring my sys admin to re-do a lot of work we’ve done on that server. (and doesn’t that module require a nginx paid subscription ?)
So we chose the purge method of: ‘Delete local server cache files. Checks for matching cache file in RT_WP_NGINX_HELPER_CACHE_PATH.’
We set the path as /home/site-owner-user/nginx-cache/cache
Due to the virtualmin PHP setup, it created it's own PHP pool for the virtual server and therefore ran PHP under the site-owner-user. But NGINX uses the cache folder as user 'www-data', however this directory was not writable by other users. Therefore when wordpress tried to clear the cache, the folder could not be deleted and recreated.
I could fix this by manually changing the folder permissions, but when wordpress recreated the cache folder it would now be owned by the user 'classicwp' and NGINX could no longer write cache files to that location. When we tried to do a shared ‘group’ for them, nginx just ignored that. NGINX doesn't allow us to specify the file permissions for the cache files it creates. They're stuck at a level that does not allow the group to write.
We CAN make it work when we change the PHP user to www-data (same as nginx), but this raises security problems if 20 wordpress clients all run as that same nginx user, www-data.
So, what is the solution?
Thanks so much for any ideas
The text was updated successfully, but these errors were encountered: