# # /etc/nginx/conf.d/pihole.conf # # https://github.com/pi-hole/pi-hole/wiki/Nginx-Configuration # server { listen 80 default_server; listen [::]:80 default_server; root /srv/http/pihole; server_name _; autoindex off; index pihole/index.php index.php index.html index.htm; location / { expires max; try_files $uri $uri/ =404; } location ~ \.php$ { include fastcgi.conf; fastcgi_pass 127.0.0.1:9000; } location /*.js { index pihole/index.js; } location /admin { root /srv/http/pihole; index index.php index.html index.htm; } location ~ /\.ht { deny all; } }