php-fpm 7.1 - php-fpm-5.6 - nginx - mySql
Переносил изначально yii с опен сервера... и все работало до недавнего момента когда решил доставить сторонние расширения.
nginx:
Код: Выделить всё
server
{
listen 80;
server_name yii2.test www.yii2.test;
root /var/www/yii2.test/frontend/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;
}
# deny accessing php files for the /assets directory
location ~ ^/assets/.*\.php$ {
deny all;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php7:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
#fastcgi_param PHP_VALUE "date.timezone = Europe/Moscow";
}
location ~* /\. {
deny all;
}
}
server
{
listen 80;
server_name admin.yii2.test www.admin.yii2.test;
root /var/www/yii2.test/backend/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;
}
# deny accessing php files for the /assets directory
location ~ ^/assets/.*\.php$ {
deny all;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php7:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
#fastcgi_param PHP_VALUE "date.timezone = Europe/Moscow";
}
location ~* /\. {
deny all;
}
}
Код: Выделить всё
RUN apt-get install -y git
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer global require "fxp/composer-asset-plugin:~1.4.2"
Код: Выделить всё
COMPOSER_ALLOW_SUPERUSER: 1
Код: Выделить всё
composer create-project --prefer-dist yiisoft/yii2-app-advanced .
php init
далее имею фантастический результат
скрины ниже