I am planning to move away from apache itk + mod_php to nginx and
php-fpm. I have a few virtual hosts (less than 10) and unix
user-accounts associated with these vhosts. I already found the pool
option of fpm which looks like the perfect way for me to match the
domains to the uid php will be using.
However right now nginx itself is always running as user www-data so
www-data needs read permissions to all static files of all vhosts. Is
there a way to configure nginx to use different uid/gids on different
domains (so a user directive inside a server block)? This way my users
won’t bother me that their website isn’t running anymore everytime they
screw up their file/directory permissions.
Posted at Nginx Forum: