Сделал проект на Yii2 под share host как описано здесь https://github.com/yiisoft/yii2-app-adv ... hosting.md.
Создал NGNIX конфиг как указано здесь https://github.com/mickgeek/yii2-advanc ... nginx.conf
Все работает, не работает только в админке часть функций.
Если в админке я набираю url - http://site.com/admin/backoffice/backend-partners, то работает.
Если набираю url с параметрами - http://site.com/admin/backoffice/backen ... fo?id=8699, то не работает Bad Request (#400).
Вот конфиг
Код: Выделить всё
server
{
listen 80;
root /var/www/site;
index index.php index.html index.htm;
charset utf-8;
client_max_body_size 100M;
client_header_buffer_size 4k;
large_client_header_buffers 8 16k;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
server_name site.com;
location /
{
try_files $uri $uri/ /index.php?$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html
{
root /var/www/;
}
# pass the PHP scripts to FastCGI server listening on /var/run/php5-fpm.sock
location ~ \.php$
{
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(htaccess|htpasswd|svn|git)
{
deny all;
}
location /admin {
alias /var/www/site/admin;
try_files $uri /admin/index.php;
}
location ~* ^/admin/(.+\.php)$
{
try_files $uri /admin/$1?$args;
}
}