I've just installed webtrees on a brand new Centos 8 VM after installing nginx and PHP. I can browse to my test php files on the root of the web site, but I get 'forbidden' when I try to browse /webtrees and 'access denied' when I browse /webtrees/index.php'
I have created two test files nginx/html/webtrees/hello.php and nginx/html/test/hello.php - both folders have the same permissions and owners, as do the files.
I can browse the /test/hello.php file but not the /webtrees/hello.php file.
This is the error if I browse the webtrees folder:
[error] 5244#0: *8 open() "/usr/share/nginx/html/webtrees" failed (13: Permission denied), client: x.x.x.x, server: _, request: "GET /webtrees HTTP/1.1", host: "x.x.x.x"
This is the error if I browse my test file webtree/hello.php:
[error] 5244#0: *9 FastCGI sent in stderr: "Unable to open primary script: /usr/share/nginx/html/webtrees/hello.php (Permission denied)" while reading response header from upstream, client: x.x.x.x, server: _, request: "GET /webtrees/hello.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "x.x.x.x"
There is no error if I browse a copy of my test file test/hello.php
I can't even browse the apple-touch-icon.png in the webtrees folder, but I can if I copy it to the test folder.
drwxr-xr-x. 2 nginx nginx 51 Oct 16 23:39 test
drwxr-xr-x. 11 nginx nginx 4096 Oct 16 23:38 webtrees
-rw-r--r--. 1 nginx nginx 5709 May 11 13:24 webtrees/apple-touch-icon.png
-rw-r--r--. 1 nginx nginx 5709 Oct 16 23:39 test/apple-touch-icon.png
Yes, it was SELinux (enabled by default on Centos 8) - sorry, not used Linux much in a very long time!
I've set permissive mode on httpd_t context, restarted nginx and I can now start the Webtrees wizard.
Thanks for pointing me in the right direction.