39 lines
940 B
Nginx Configuration File
39 lines
940 B
Nginx Configuration File
worker_processes 1;
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
root /var/www/html/pihole;
|
|
index index.php index.html index.nginx-debian.html;
|
|
|
|
error_page 404 /pihole/index.html;
|
|
|
|
location ~ ^/admin/ {
|
|
add_header X-Pi-hole "The Pi-hole Web interface is working!";
|
|
|
|
location ~ .php$ {
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_index index.php;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
}
|
|
}
|
|
|
|
location / {
|
|
add_header X-Pi-hole "A black hole for Internet advertisements." always;
|
|
}
|
|
}
|
|
|
|
}
|