docker-pi-hole/s6/alpine-root/etc/nginx/nginx.conf

46 lines
1.2 KiB
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 {
# PHP SERVER_NAME is empty unless set, which can bug out ipv6less setups
server_name _;
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index pihole/index.php index.php;
error_page 404 =200 /pihole/index.php;
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /*.js {
index pihole/index.js
error_page 404 =200 /pihole/index.js;
}
location ~ ^/admin/ {
add_header X-Pi-hole "The Pi-hole Web interface is working!";
}
location / {
add_header X-Pi-hole "A black hole for Internet advertisements." always;
}
}
}