summarylogtreecommitdiffstats
path: root/nginx.pi-hole.conf
blob: 895bc839cce40df2ea165284407a829056d6e1f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# place in /etc/nginx/conf.d/pihole.conf

server {  
    listen   80 default_server;
    listen   [::]:80 default_server;
    server_name _;

    root /srv/http/pihole/admin;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php;
    }

    location ~ /\. {
        deny  all;
    }

    location ~ \.php$ {
        fastcgi_param HTTP_HOST localhost;
        fastcgi_param HTTP_ORIGIN localhost;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        include fastcgi.conf;
    }
}