Is it possible with nginx?

Peter Vage lists at
Mon Feb 16 02:41:44 MSK 2009

I have problem, can anybody know why when i use variable this code 
doesn't work, and when i type direct address it works? Strange is that 
this variable works in two other places of this config.

server {
  server_name *;
  if ($host ~* "(.*)\.files\.com" ) {
  set $host_without_files $1;

  location ~* ^.+\.(jpg|jpeg|gif|png) {
  root /home/www-data/$host_without_files; ### works, folder created
  access_log off;
  expires 2d;
  error_page 404 = @fetch;

  location @fetch {
  proxy_pass http://$host_without_files; #!!!! DOESN'T WORK, 502 Bad 
Gateway, if i type here http://web1.http then it works
  proxy_store  on;
  proxy_store_access  user:rw  group:rw  all:r;
  proxy_temp_path  /home/www-data/temp;
  root /home/www-data/$host_without_files; ### works, folder created


Posted via

More information about the nginx mailing list