Roman Vasilyev
December 06, 2011 06:54PM
Следующая проблемка, кусок конфига
location /download {
rewrite ^ /uwsgi/download.py last;
location /download/storage/ {
internal;
alias /$1;
post_action /uwsgi/last.py;
}
}
download определяет положение файла из python скрипта с помощью
"X-Accel-Redirect"

нужно дернуть post_action с параметрами файла? наткнулся на следующее
поведение, когда дописываю вопрос в параметре post_action скрипт вообще
прекращает вызываться, не посоветуете как туда передать дополнительные
параметры?
тоесть нужно написать нечто вроде post_action /uwsgi/last.py?file=$1;

# /usr/sbin/nginx -V
nginx version: nginx/1.1.8
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
TLS SNI support disabled
configure arguments: --with-debug --user=fileservices
--group=fileservices --prefix=/usr/share/nginx
--sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/fileservices/tmp/client_body
--http-proxy-temp-path=/var/lib/fileservices/tmp/proxy
--http-fastcgi-temp-path=/var/lib/fileservices/tmp/fastcgi
--pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx
--with-http_ssl_module --with-http_realip_module
--with-http_addition_module --with-http_sub_module
--with-http_dav_module --with-http_flv_module
--with-http_gzip_static_module --with-http_stub_status_module
--with-http_perl_module --with-mail --with-mail_ssl_module
--with-http_secure_link_module --with-http_random_index_module
--with-http_xslt_module --with-cc-opt='-O2 -g -m64 -mtune=generic'
--add-module=../src/ngx_http_body_size_module
--add-module=../src/ngx_subrequest_module
--add-module=/root/work/nginx/branches/1.1.8/BUILD/nginx-1.1.8/vkholodkov-nginx-upload-module-8d271b1

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

параметры для post_action

Roman Vasilyev December 06, 2011 06:54PM

Re: параметры для post_action

Roman Vasilyev December 06, 2011 07:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 195
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