<commit_before>Yii 2 Basic Project Template

REQUIREMENTS
------------

Я локально установил php7, composer, mysql5.5, apache

INSTALLATION

Установка

Разворачиваем проект из гита локально
Далее запускаем команду composer install
После в корне проекта запускаем php yii migrate

CONFIGURATION
-------------

### База данных

Конфигирурем базу, например:

```php
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=yii2basic',
    'username' => 'root',
    'password' => '<PASSWORD>',
    'charset' => 'utf8',
];
```

Server
-------------

Рекомендуемая Apache конфигурация:

# Set document root to be "basic/web"
DocumentRoot "path/to/basic/web"

<Directory "path/to/basic/web">
    # use mod_rewrite for pretty URL support
    RewriteEngine on
    # If a directory or a file exists, use the request directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Otherwise forward the request to index.php
    RewriteRule . index.php

    # ...other settings...
</Directory>

Рекомендуемая Nginx конфигурация:

server {
    charset utf-8;
    client_max_body_size 128M;

    listen 80; ## listen for ipv4
    #listen [::]:80 default_server ipv6only=on; ## listen for ipv6

    server_name mysite.local;
    root        /path/to/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/php5-fpm.sock;
        try_files $uri =404;
    }

    location ~* /\. {
        deny all;
    }
}<commit_msg>updated read me file<commit_after>Yii 2 Basic Project Template

REQUIREMENTS
------------

Я локально установил php7, composer, mysql5.5, apache

INSTALLATION
-------------

Установка

Разворачиваем проект из гита локально
Далее запускаем команду composer install
После в корне проекта запускаем php yii migrate

CONFIGURATION
-------------

### База данных

Конфигирурем базу, например:

```php
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=yii2basic',
    'username' => 'root',
    'password' => '<PASSWORD>',
    'charset' => 'utf8',
];
```

Server
-------------

#Рекомендуемая Apache конфигурация:

DocumentRoot "path/to/basic/web"

<Directory "path/to/basic/web">
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php
</Directory>

#Рекомендуемая Nginx конфигурация:

server
{
    charset utf-8;
    client_max_body_size 128M;

    listen 80; ## listen for ipv4

    server_name mysite.local;
    root        /path/to/basic/web;
    index       index.php;

    access_log  /path/to/basic/log/access.log;
    error_log   /path/to/basic/log/error.log;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    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/php5-fpm.sock;
        try_files $uri =404;
    }

    location ~* /\. {
        deny all;
    }
}
{'fraction_non_alphanumeric': 0.13428943937418514, 'fraction_numerical': 0.017470664928292048, 'mean_word_length': 2.6120527306967984, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7160318', 'n_tokens_mistral': 1468, 'n_tokens_neox': 1391, 'n_words': 316}