Is it possible with nginx?

Peter Vage lists at
Mon Feb 16 14:59:34 MSK 2009

Igor Sysoev wrote:
> On Mon, Feb 16, 2009 at 10:33:07AM +0100, Peter Vage wrote:
>> in my config in proxy_pass was not web1.http
>> proxy_pass http://$host_without_files; #!!!! DOESN'T WORK, 502 Bad 
>> Gateway, if i type here then it works
> Have you tried
>    proxy_pass http://$$request_uri;
> ?

Yes I have website
I go to

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

proxy_pass; #works, cache file is under 
proxy_pass http://host_without_files; # not work, 502 Bad Gateway
proxy_pass http://host_without_files$request_uri; # not work, 502 Bad 
proxy_pass$request_uri; # not work, 502 
Bad Gateway, why .com is before $request_uri

I would be better when it catch any websites before, but then 
i can't control who use it, and as said Maxim it could use more cpu.

I did as say Maxim, but it is question why it don't work, I am using 
0.7.24, i see that Coral Content Delivery Network use the same version. 
They response header is:

Server: nginx/0.7.24
Date: Mon, 16 Feb 2009 12:59:27 GMT
Content-Type: image/jpeg
Content-Length: 66965
Last-Modified: Mon, 09 Feb 2009 18:14:52 GMT
Connection: close
Accept-Ranges: none
Via: HTTP/1.0 (CoralWebPrx/0.1.19 (See
Cache-Control: max-age=2595698
Expires: Wed, 18 Mar 2009 12:59:27 GMT

200 OK

Posted via

More information about the nginx mailing list