Skip to content

Instantly share code, notes, and snippets.

View metalagman's full-sized avatar

Alexey Samoylov metalagman

View GitHub Profile
server {
listen 80;
server_name yiidreamteam.com;
charset utf-8;
root /var/www/yiidreamteam/frontend/web;
location / {
index index.php;
server {
listen 80;
error_log /var/log/nginx/yiisite.log;
server_name yiisite.loc;
charset utf-8;
root /var/www/yiisite/web;
# Cloudflare
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
@metalagman
metalagman / bad_referer.conf
Last active September 12, 2016 01:12
HTTP referer spam blocking for nginx
map $http_referer $bad_referer {
hostnames;
default 0;
.semalt.com 1;
.kambasoft.com 1;
.savetubevideo.com 1;
.descargar-musica-gratis.net 1;
.7makemoneyonline.com 1;
.baixar-musicas-gratis.com 1;
.iloveitaly.com 1;