exclude some server_name from location processing

Martin Minka martin.minka at gmail.com
Tue Jan 16 00:02:20 MSK 2007


nginx is great, but I have small problem when I try to use it.
 
I would like to do something like:
  # rule 1
  location ~*
^.+.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|css|doc|xls|exe|pdf|ppt|txt|tar
|mid|midi|wav|bmp|rtf|js|swf|xml)$ {
 
    # critical part
    if ($server_name ~* ignore-static.com) {
        # skip to the next rule #2
        break;
    }
......
  }
 
  # rule 1
  location / {
    # non static files
......
  }
 
 
Any suggestion on how to achieve this ?
 
Thank you,
Martin Minka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20070115/97f75f61/attachment.html>


More information about the nginx mailing list