This quick post will show how we can easily allow only certain http referrers see some location using nginx. This might be useful for example if you are using nginx as a static content provider and want to not allow everyone hot-linking your images and only your own sites. Doing something like this in nginx [...]
Using wildcards in nginx valid_referers
August 25th, 2009 · 1 Comment
Tags: HowTo · Tips and Tricks · sysadmin
nginx rewrite to index
May 27th, 2009 · No Comments
Looking to rewrite all file requests to index?
location / {
root /var/www/nginx-default;
index index.html;
if (!-e $request_filename) {
rewrite . /index.html last;
}
}
Tags: hosting
