INT 21h

Hi, I am Vladimir Smagin, SysAdmin, DevOps and barely good guy. Telegram Email / GIT / Микроблог / Thingiverse / RSS / GPG

Борьба с хотлинками в nginx

№ 8099 В разделе "Sysadmin" от February 25th, 2016,
В подшивках: ,

Надоели хотлинкеры, сосущие траффик гигабайтами? Отличный рецепт:

location ~ .(gif|png|jpe?g)$ {
    valid_referers blindage.org;
    if ($invalid_referer) {
        access_log /var/log/nginx/hotlinks.log;
        rewrite (.*)\.(jpg|jpeg|png|gif)$ http://blindage.org/;
    }
}

Нет комментариев »

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Яндекс.Метрика

Fortune cookie: Today's spam: she wants you bad ${SiteURL} With this supplement, you can gain up to 3 inches in just a few short weeks.