summarylogtreecommitdiffstats
path: root/nginx.pi-hole.conf
blob: 5ebede10b781fec46f981273cde18fc4db6009fe (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
27
28
29
30
server {
        listen          :80 default_server;
        server_name     pi.hole
                        _;
        access_log      /var/log/nginx/pihole-access.log main;
        error_log       /var/log/nginx/pihole-error.log;
        root            /srv/http/pihole;
        add_header      X-Pi-hole "The Pi-hole Web interface is working!";
        add_header      X-Frame-Options "SAMEORIGIN";
        add_header      X-XSS-Protection "0";
        add_header      X-Content-Type-Options "nosniff";
        add_header      Content-Security-Policy "default-src 'self' 'unsafe-inline';";
        add_header      X-Permitted-Cross-Domain-Policies "none";
        add_header      Referrer-Policy "same-origin";
        #pi.hole
        location / {
                return          301 http://pi.hole/admin;
        }
        location /admin {
                index           index.php;
        }
        location ~ \.php$ {
                fastcgi_pass    unix:/run/php-fpm/php-fpm.sock;
                fastcgi_param   SERVER_NAME $host;
                include         fastcgi.conf;
        }
        location = /favicon.ico { access_log off; log_not_found off; }
        location ~ /\.          { access_log off; log_not_found off; deny all; }
        location ~ ~$           { access_log off; log_not_found off; deny all; }
}