location help

Igor Sysoev is at rambler-co.ru
Sat Dec 8 21:19:05 MSK 2007


On Sat, Dec 08, 2007 at 10:16:12AM -0800, rkmr.em at gmail.com wrote:

> is there a way i can combine this into one location :
> 
> 
>         location ~ ^/[^/]+\.ico$ {
>             root   /home/mark/work/pop/static;
>         }
>         location ~ ^/[^/]+\.xml$ {
>             root   /home/mark/work/pop/static;
>         }
>         location ~ ^/[^/]+\.xml.gz$ {
>             root   /home/mark/work/pop/static;
>         }
>         location ~ ^/[^/]+\.html$ {
>             root   /home/mark/work/pop/static;
>         }
>         location ~ ^/[^/]+\.txt$ {
>             root   /home/mark/work/pop/static;
>         }
>         location ~ ^/[^/]+\.txt.gz$ {
>             root   /home/mark/work/pop/static;
>         }

          location ~ ^/[^/]+\.(ico|xml|xml\.gz|html|txt|txt\.gz)$ {
              root   /home/mark/work/pop/static;
          }


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





More information about the nginx mailing list