summaryrefslogtreecommitdiffstats
path: root/roles/pihole/templates/pihole.nginx.conf.j2
blob: 7a28b821f90b4512d2a067f58cc73d8bed5d5fa1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
server {
    listen 80;
    listen [::]:80;

    server_name {{ pihole_hostname }};

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    location = / {
        return 301 /admin/;
    }

    location /admin/ {
        proxy_pass http://127.0.0.1:{{ pihole_port }}/admin/;
    }
    location /api/ {
        proxy_pass http://127.0.0.1:{{ pihole_port }}/api/;
    }
}