How to allocate rights between nginx and folder engine CMS?

Good afternoon, faced a problem:
Installed nginx and it runs as www-data, but the root of the site lies on the path /home/olya/www/site.
Accordingly, CMS-Modx when using composer set the owner and rights of all of the engine files on the user olya.
But with nginx, which runs as user www-datacannot run, edit, and even view most of the engine files.
I tried to run the nginx from the user olya, changing the file nginx.conf:
with user www-data;
on user olya;
But nothing has changed.
Tell me, what can I do?

PS: Now nginx run from www-data, pre-modifying group and user name of all engine files to www-data.
March 19th 20 at 09:09
3 answers
March 19th 20 at 09:11
Solution
You need to change the user php-fpm is the options user and group.
To put it in there olya
March 19th 20 at 09:13
Ngnix is a web server. He's just handing out static can. How do you manage edit your files through it? It needs to run as www-data.
You need it in PHP side to watch.
March 19th 20 at 09:15
Good afternoon.
You need to use the package libapache2-mpm-itk.
How to use it properly will find in my question/answer.
The first link in the answer will find the settings for nginx.

Find more questions by tags UbuntuNginxLinux