Welcome! Log In Create A New Profile

Advanced

proxy_temp_path and set variable

Vasiliy G Tolstov
November 30, 2010 06:10AM
Доброго времени суток.
Случайно заметил, что если путь в 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@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

proxy_temp_path and set variable

Vasiliy G Tolstov November 30, 2010 06:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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