server { listen 80; index index.php; # Allow only local systems # allow 192.168.0.0/16; # deny all; # Security-related add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff; # Root # Review /etc/vhosts/webapp-config if necessary # Install with webapp-config -I pihole-admin-lte $VERSION # This is path where index.php is root /var/www/localhost/htdocs/pihole-admin-lte; # You can instead directly reference the installed files without using # webapp-config, but you must update the path on every update # root /usr/share/webapps/pihole-admin-lte/5.9/htdocs; # The app will be under http://server_name/admin # Comment out the following lines if you do not want this rewrite ^/admin(.*)$ $1 last; location / { return 301 http://$server_name/admin; } location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; } include fastcgi_params; fastcgi_pass unix:/run/pihole-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # Mitigate https://httpoxy.org/ vulnerabilities fastcgi_param HTTP_PROXY ""; } location ~* \.(svn|git|patch|htaccess|log|inc|pl|po|sh|ini|sql)$ { deny all; } }