Welcome! Log In Create A New Profile

Advanced

client_max_body_size в локейшине

March 30, 2014 09:47AM
Никак не могу решить проблему с client_max_body_size

В общем суть в том что есть только 1 входной файл index.php (YII Framework) вот конфиг:

========================
server {
listen 80;
server_name example.com;
client_max_body_size 1m;

set $home_root "/var/www/mysite";
root $home_root/public;

location /manage {
client_max_body_size 100m;
try_files $uri $uri/ /index.php?$args;
}

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

location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(.*)$;
set $fsn /index.php;
if (-f $document_root$fastcgi_script_name) { set $fsn $fastcgi_script_name; }
fastcgi_pass backend-php;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;
include fastcgi_params;
}

}
========================

В самом фреймворке роутинг для админки прописывается на подобии /manage/publication/edit/12 /manage/publication/delete/12 /manage/publication/12/files и т.д.

Так вот для всех URL которые начинаются на manage надо увеличить client_max_body_size что я и попытался сделать в приведенном конфиге. Не сработало, видимо потоу что с локейшена /manage запрос все равно уходит в локейшен / а там видимо client_max_body_size = 1m

Как решить эту задачу?
Subject Author Posted

client_max_body_size в локейшине

ast-ross March 30, 2014 09:47AM

Re: client max body size в локейшине

ramm March 31, 2014 12:56AM

Re: client max body size в локейшине

ast-ross March 31, 2014 07:44AM

Re: client max body size в локейшине

ast-ross March 31, 2014 07:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 261
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready