Is this possible

Igor Sysoev is at rambler-co.ru
Thu Jun 19 20:27:22 MSD 2008


On Thu, Jun 19, 2008 at 12:23:33PM -0400, nginx at fuse969.com wrote:

> Hey Guys,
> 
>  Was wondering if anyone knows of possible way of having nginx sit in front
> and  server up static requests for images and videos but everything else
> proxy to apache.  would this syntax work put the static files first and
> then after that forward to apache on 8080?
> 
> 
> 
>  # serve static files directly
>         location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html)$ {

-         location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html)$ {
+         location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {

+             root              /path/to/files;

>             access_log        off;
>             expires           30d;
>         }
>     location / {
>             proxy_pass         http://127.0.0.1:8080/;
>             proxy_redirect     off;

Yes.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list