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