Yii2 Install path /srv/http/basic/web Nginx config: Код (Text): server { charset utf-8; client_max_body_size 256M; listen 80; ## listen for ipv4 #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 server_name test.yii; root /srv/http/basic/web; index index.php; #access_log /path/to/basic/log/access.log; #error_log /path/to/basic/log/error.log; location / { # Redirect everything that isn't a real file to index.php try_files $uri $uri/ /index.php$is_args$args; } # uncomment to avoid processing of calls to non-existing static files by Yii #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { # try_files $uri =404; #} #error_page 404 /404.html; # deny accessing php files for the /assets directory location ~ ^/assets/.*\.php$ { deny all; } location ~ \.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #fastcgi_pass 127.0.0.1:9000; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; try_files $uri =404; } location ~* /\. { deny all; } } index.php Код (Text): <?php //phpinfo(); // comment out the following two lines when deployed to production defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'dev'); require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; $config = require __DIR__ . '/../config/web.php'; (new yii\web\Application($config))->run(); Error This page isn’t working test.yii is currently unable to handle this request. HTTP ERROR 500 phpinfo работает Kак исправить ошибку? --- Добавлено --- 2019/04/05 00:33:35 [error] 18139#18139: *1 FastCGI sent in stderr: "PHP message: PHP Warning: require(/srv/http/basic/web/../vendor/autoload.php): failed to open stream: No such file or directory in /srv/http/basic/web/index.php on line 8 PHP message: PHP Fatal error: require(): Failed opening required '/srv/http/basic/web/../vendor/autoload.php' (include_path='.:/usr/share/php') in /srv/http/basic/web/index.php on line 8" while reading response header from upstream, client: 127.0.0.1, server: test.yii, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "test.yii"
Так всё же понятно написано - нет файла. Этот файл генерируется автоматически программой composer по командам composer update, composer install. В репозиторий папку vendor обычно не кладут, поэтому при деплое проектов на современных фреймворках эту команду надо выполнить вручную --- Добавлено --- P.S. Не заметил, что ты тоже из команды форума, да и постарше меня.. Странный тогда вопрос...