summarylogtreecommitdiffstats
path: root/nginx.pi-hole.conf
blob: 51d02f3168300bfc0a81837d1774f1dbfe78f873 (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/pi_hole.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;
    }
}