Linux System Admins Blog

System admins of Promet – an e-commerce, high availability Open Source web shop – share their findings

Linux System Admins Blog header image 4

Using wildcards in nginx valid_referers

August 25th, 2009 · 1 Comment

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 [...]

[Read more →]

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;
}
}

[Read more →]

Tags: hosting