pi-hole/block hulu ads/nginx-pi-hole.conf
Igor Rzegocki 34ff9b309a Added nginx as an optional server.
Why? For the glory of satan of course...
Also, many people tends to use their PIs for multiple purposes. As mail
servers, webpage hosting etc. Usually in that cases nginx is used as far
more powerful alternative to lighttpd, and fair more lighter than
apache. This patch allows them to unleash the power of pi-hole without
too much hacking.

Also, I'm the one of those people, and needed it ;).
2016-01-28 20:56:01 +01:00

28 lines
705 B
Text

server {
listen 80;
listen [::]:80;
root /var/www/html;
error_page 404 /pihole/index.html;
location ~ ^/admin/ {
index index.php;
add_header X-Pi-hole "The Pi-hole Web interface is working!";
location ~ .php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
location / {
add_header X-Pi-hole "A black hole for Internet advertisements.";
}
}
server {
server_name ads.hulu.com ads-v-darwin.hulu.com;
return 301 http://192.168.1.101:8200/MediaItems/19.mov;
}