HTTP/1.1 302 Moved Temporarily

Sergey Shepelev temotor gmail.com
10 13:50:49 MSD 2011


>  -   
>  ...  HTTP- 
>   nginx   
>  :
> HTTP/1.1 302 Moved Temporarily
> Content-Length: 0
> Location: /file.dat?4eca8670
>
> ޣ, "?4eca8670" -    
> nginx.     
>  .  
>   ,   ..   
>    .  

nginx       /file.dat?4aca8670? .
   =    nginx.  ,   -
 .
  ,    debug log.

>        # Static files location
>      location ~*
> ^.+\.(dat|jpg|jpeg|gif|png|ico|mp3|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|avi|ppt|tar|mid|midi|wav|bmp|wmv|mpeg|mpg|tbz|js)$
> {
>
>        root  /home/whatever/site.ru/docs/$subdomain;
>        set $subdomain "";
>            if ($host ~* ^([a-z0-9-\.]+)\.site.ru$) {
>                set $subdomain "subdmn/$1";
>                }
>            if ($host ~* ^www.site.ru$) {
>                set $subdomain "";
>                }
>
>           }
>     }
> }
>

 if ($host ...)   server_name.


nginx-ru