This would work, but I don’t have a fixed root for images. I’d like to
do it
throughout an entire site - or would I simply change the root in the
above
example to my document root ?
Chris I gave that a shot, but am testing the site with Firebug & YSlow
(dunno if
you’ve used them but it’s a Yahoo thing that isolates slowdowns on page
loads
and makes recommendations.
I needed to specify the root or it would default to nginx’s default
docroot.
Your regex works well, but only works for images without underscores,
hyphens,
or anything infact that isn’t just a continuous text string. Would it be
easy
enough to modify in order to cope with this ?
It should work with underscores, hyphen’s etc. as its grabbing all
char’s
from the .+ that should match all char’s that is not a line break.
Also about ignoring root. I set my root in the base of the server
config. IE
server {
listen 80;
server_name domain.orgwww.domain.org;
I try to keep everything at the lowest part that i need it. I use the
index
directive in the main http section as most of my sites will use those.
And
if i need custom then i will adjust in each of my server sections. Same
thing with my server sections. i do a root in the toplevel of the server
directive so everything works no matter what i do and then IF i need a
location to go somewhere else i put that inside the location. I think
this
is easier and solves alot of issues of having to remember to put them in
multiple location’s etc etc. Only overwrite it if you need it.
you don’t actually -need- a location / either, it seems. unless your
config requires it due to some other stuff. but i don’t have any of
those in mine and it works fine.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.