Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
proxy_temp_path and set variable
- To: nginx-ru@xxxxxxxxx
- Subject: proxy_temp_path and set variable
- From: Vasiliy G Tolstov <v.tolstov@xxxxxxxxx>
- Date: Tue, 30 Nov 2010 14:08:46 +0300
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=selfip.ru; s=dk; h=Content-Transfer-Encoding:Mime-Version:Message-ID:Date:Content-Type:To:Reply-To:From:Subject; bh=cvKaPv0d4ludEzyTgFvEk0hJCiAUjY4jufRD/NQePIk=; b=U5ZtEcntibI3mRDv1w8SYQS4WoxATp2bFThzf/76wtqfO+462s3Q4Muh3ycqmwDxvtksFuxuTF2zimYtFLPLTau0Uic3jX2GdXQSxP4Ssl2GfFmAoBr+TA4WmwknzySR;
- Organization: Selfip.Ru
Доброго времени суток.
Случайно заметил, что если путь в proxy_temp_path задавать в виде
переменной, установленной до этого через set, то при релоде Nginx
ругается.
server {
listen 80;
server_name www.mirror.selfip.ru mirror.selfip.ru;
set $domain "mirror.selfip.ru";
root /srv/www/$domain;
access_log /srv/www/logs/mirror.selfip.ru/access_log main;
error_log /srv/www/logs/mirror.selfip.ru/error_log debug;
include /etc/nginx/templates/dotdeny.conf;
location / {
autoindex on;
}
location ~ ^/fetch/([^/]+)(/.*)$ {
internal;
set $site $1;
set $file $2;
alias /srv/www/$domain/$1$2;
proxy_pass http://$site$file;
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /srv/www/$domain/tmp;
proxy_ignore_headers X-Accel-Redirect X-Accel-Expires Expires
Cache-Control;
}
location ~ ^/([^/]+)(/.*)$ {
set $site $1;
set $file $2;
root /srv/www/$domain;
error_page 404 403 = /fetch/$site$file;
}
}
selfip vhosts # /etc/init.d/nginx reload
* Checking nginx' configuration ...
the configuration file /etc/nginx/nginx.conf syntax is ok
[emerg]: mkdir() "/srv/www/$domain/tmp" failed (2: No such file or
directory)
configuration file /etc/nginx/nginx.conf test failed
* failed, please correct errors above
Можно добавить обработку переменных в данном случае? (хотя она и не
критична)
Спасибо.
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|