Linux Sysadmin Blog

Linux Sysadmin Blog header image 4

Entries Tagged as 'nginx'

Using wildcards in nginx valid_referers

August 25th, 2009 · 3 Comments · HowTo, sysadmin, Tips and Tricks

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: ·

nginx rewrite to index

May 27th, 2009 · No Comments · hosting

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: ·