Is it possible with nginx?

Peter Vage lists at ruby-forum.com
Mon Feb 16 12:33:07 MSK 2009


Igor Sysoev wrote:
>>   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_pass http://$host_without_files;
> +   proxy_pass http://$host_without_files.http;

I am very sorry, i did mistake, was very late.

in my config in proxy_pass was web1.com not web1.http

proxy_pass http://$host_without_files; #!!!! DOESN'T WORK, 502 Bad 
Gateway, if i type here http://web1.com then it works

This is my all config which make 502 Bad Gateway

server {
listen   80;
  server_name files.com *.files.com;
  access_log off;
  error_log off;

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

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

        location @fetch {
    internal;
    proxy_pass http://$host_without_files;
    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;
        }

        location / {
    root   /home/www-data/files.com;
    index  index.html index.htm;
        }
    }
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list