Hi guys,
I want to serve a few private websites using my OMV server and installed the Nginx plugin for this cause. First, I created a new pool setting www-data as user and group, everything else is default. After that, I added a new server using a shared folder Websites I created on one of my data drives - this directory is my document root. Port-based (8080), SSL turned off, PHP turned on, beforementioned Pool is added, index.php selected.
I know that the server is working, because I can easily view regular html files or images, but I cant use php-based projects, like for example a Grav CMS that I've setup at Websites/rec/
If I try to access it, I get error messeges like this:
[error] 23387#0 *7 directory index of "/srv/diskname/Websites/rec/" is forbidden, client: 192.168.178.20, server: , request: "GET /rec/ HTTP/1.1", host: "nas:8080"
and
[error] 25342#0: *3 open() "/srv/diskname/Websites/rec/de/" failed (2: No such file or directory), client: 192.168.178.20, server: , request: "GET /rec/de/ HTTP/1.1", host: "nas:8080"
When that last error occured, it kind of seemed to work, as I saw a static 404 error page in the design of my installed Grav theme and it also redirected me to /rec/de, but it doesn't seem to be able to dynamically load and process the actuall files.
It doesn't work either, if i manually change the owner and group to all files and folders (incl. the document root) to www-data and grant full 777 access manually using ACL in the web gui after uploading all the files.
I guess the problem is, that the server uses www-data as user and group, whereas when I upload data to the directory on the server via samba, the owner of these files is the user-account uploading them and the group is "users". When I use SFTP, it is root and www-data
phpinfo() works though.
What is the recommended way to handle this?
Thanks in advance!