Is it possible with nginx?

Peter Vage lists at ruby-forum.com
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 files.com *.files.com;
  ....
  ....
  if ($host ~* "(.*)\.files\.com" ) {
  set $host_without_files $1;
  }

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

  location @fetch {
  internal;
  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/files.com/$host_without_files; ### works, folder 
web1.com created
  }

Peter

-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list