Location help

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;
    }

On Sat, Dec 08, 2007 at 10:16:12AM -0800, [email protected] wrote:

        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;
      }

On Dec 8, 2007 10:19 AM, Igor S. [email protected] wrote:

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

thanks a lot! works great!!!
these files will be served by nginx directly right? and not sent to
backends? pl. correct me if i am wrong
thanks

On Sat, Dec 08, 2007 at 10:27:12AM -0800, [email protected] wrote:

    }

backends? pl. correct me if i am wrong
Yes.

Am 08.12.2007 um 19:27 schrieb [email protected]:

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

thanks a lot! works great!!!
these files will be served by nginx directly right? and not sent to
backends? pl. correct me if i am wrong

Yes, they will be served from the filesystem.

HTH,

__Janko

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs