# 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; } }