I installed LEMP both with RH and REMI, and I have the problem as in PHP-FPM has no permission to require autoload.php and php_info(); works fine. I can require any other file but this. I also tried to set permissions to 0777 and group owners was set to nginx:nginx, but does not work; I don't know why.
This is the error I got from nginx/error.log:
[error] 8450#0: *56 FastCGI sent in stderr: "PHP message: PHP Warning: require(/usr/share/nginx/html/vendor/autoload.php): failed to open stream: No such file or directory in /usr/share/nginx/html/index.php on line 22
PHP message: PHP Fatal error: require(): Failed opening required '/usr/share/nginx/html/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/nginx/html/index.php on line 22"
The strange thing is if change the content of autoload.php to <?php php_info(); ?> it works.
I followed How to Install Nginx, MySQL, PHP v7 (LEMP) stack on CentOS 7 and also How to Install and Configure a LEMP Stack using Software Collections on CentOS 7 .