Maybe post this to the nginx list?

Dan Webb wrote:
> Hi Everyone,
>
> Im using the standard rails/mongrel config script
> (http://wiki.codemongers.com/NginxRubyonRailsMongrel) for a rails site
> but Im trying to block images from being linked from other sites.
>
> It looks like something like this is supposed to do it:
>
> location ~* \.(gif/jpg/png/swf/flv)$ {
>  valid_referers none blocked mydomain.coml;
>
>  if ($invalid_referer) {
>    return 403;
>   }
> }
>
> But when I insert this inside the server block (after the location
> /50x.html) line all my images come up as 404 when requested via the
> site....Nginx is pretty hard to work out in these cases....any ideas
> why this is happening?
>
> In fact, even if I put that location block in with nothing in it at
> all it 404s my images...
>
> Cheers,
>
> --
> Dan Webb
> http://www.danwebb.net
>
> Event Wax (http://www.eventwax.com)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to