Having issues with nginx / root captures (0.7.53)

Igor Sysoev is at rambler-co.ru
Fri May 1 10:38:08 MSD 2009


On Thu, Apr 30, 2009 at 11:26:05PM -0700, Michael Shadle wrote:

> 2009/4/30 Igor Sysoev <is at rambler-co.ru>:
> 
> >         include /etc/nginx/expires.conf;
> >
> > this "html" is captured.
> 
> yep
> 
> # cat expires.conf
> location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
>         expires max;
>         access_log off;
> }
> 
> so ... how can i use root captures but still have these other options?
> 
> make a location / {} block and then put the sub-includes in with it?

           server_name  ~...

           set  $name  $1;

           root  /....$name;

The "set" runs early as well as "if/rewrite".


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





More information about the nginx mailing list