06 - Уроки Linux. Установка yii2 на ubuntu
Установка yii2 на ubuntu.
sudo apt-get install
sudo apt-get install
curl -sS | php
sudo mv /usr/local/bin/composer
sudo composer global require “fxp/composer-asset-plugin:~“
composer create-project --prefer-dist yiisoft/yii2-app-advanced project
sudo php init
Настраиваем конфигурацию nginx:
sudo nano /etc/nginx/sites-available/default
Меняем содержимое на:
!!!Меняем путь в root
server{
charset utf-8;
client_max_body_size 128M;
listen 80;
server_name ;
#root /var/www/yii/project/backend/web;
root /var/www/yii/project/backend/web;
index ;
access_log /var/log/nginx/;
error_log /var/log/nginx/;
location / {
try_files $uri $uri/ /?$args;
}
include /etc/nginx/;
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
access_log off;
log_not_found off;
expires off;
}
location ~ /\.(h