Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wonder with nginx can I:

Check if content-type == "image/x-jpeg" || content-type == "image/png" || content-type == "image/gif"

If true && referrer != "" && referrer != "": Return a 404 result or an image of my choice.

Update: This is a duplicate. But I could not find it (the duplicate) until I posted. So I am leaving this here for others.

share|improve this question
Well, this is almost a duplicate:… – unixman83 Mar 26 '12 at 0:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.