summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormax.bra2017-10-09 17:52:26 +0200
committermax.bra2017-10-09 17:52:26 +0200
commit5d4099f6c73240396776b2f73af27cb61f0471cb (patch)
treee37a8019843e44e29dcf672cda9201ff0ae2e259
parent4c190e47d1044c38acd325182922b71598fd16d7 (diff)
downloadaur-5d4099f6c73240396776b2f73af27cb61f0471cb.tar.gz
removed lighttpd open_basedir, aligned nginx conf to lighttpd one
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--lighttpd.conf2
-rw-r--r--nginx.pi-hole.conf50
4 files changed, 51 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6dff4825f352..253a30c47895 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pi-hole-server
pkgdesc = The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server.
pkgver = 3.1.4
- pkgrel = 4
+ pkgrel = 5
url = https://github.com/pi-hole/pi-hole
install = pi-hole-server.install
arch = any
@@ -37,8 +37,8 @@ pkgbase = pi-hole-server
md5sums = 2c0bf61ec96bdb85edeb9fd2cc2f330b
md5sums = 3f1aeea43af0b192edb36b9e5484ff87
md5sums = 7ac346581ada71187b7fd18f164bbee9
- md5sums = 141977dd9d76c75c7a5d7f68678c0b86
- md5sums = 9618204d16333873136e65f886db2ab3
+ md5sums = fec45782a36ea18c25743cbeeb4ef340
+ md5sums = 8d72c1c97b063cb9fed8deb91234fac3
md5sums = 990b8abd0bfbba23a7ce82c59f2e3d64
md5sums = 047f13d4ac97877f724f87b002aaee63
md5sums = d42a864f88299998f8233c0bc0dd093d
diff --git a/PKGBUILD b/PKGBUILD
index 2878aa3169d1..feeb021b9916 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=pi-hole-server
_pkgname=pi-hole
pkgver=3.1.4
-pkgrel=4
+pkgrel=5
_wwwpkgname=AdminLTE
_wwwpkgver=3.1
pkgdesc='The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server.'
@@ -41,8 +41,8 @@ md5sums=('e231722332116b7ffab316d5c66a828e'
'2c0bf61ec96bdb85edeb9fd2cc2f330b'
'3f1aeea43af0b192edb36b9e5484ff87'
'7ac346581ada71187b7fd18f164bbee9'
- '141977dd9d76c75c7a5d7f68678c0b86'
- '9618204d16333873136e65f886db2ab3'
+ 'fec45782a36ea18c25743cbeeb4ef340'
+ '8d72c1c97b063cb9fed8deb91234fac3'
'990b8abd0bfbba23a7ce82c59f2e3d64'
'047f13d4ac97877f724f87b002aaee63'
'd42a864f88299998f8233c0bc0dd093d'
diff --git a/lighttpd.conf b/lighttpd.conf
index 366ec4cf2f22..b3b9a18b72cd 100644
--- a/lighttpd.conf
+++ b/lighttpd.conf
@@ -44,7 +44,7 @@ mimetype.assign = (
fastcgi.server = (
".php" => (
"localhost" => (
- "bin-path" => "/usr/bin/php-cgi -d open_basedir=/srv/http/pihole:/run/pihole-ftl/pihole-FTL.port:/run/log/pihole/pihole.log:/run/log/pihole-ftl/pihole-FTL.log:/etc/pihole:/etc/hosts:/etc/hostname:/etc/dnsmasq.d/03-pihole-wildcard.conf:/proc/meminfo:/proc/cpuinfo:/sys/class/thermal/thermal_zone0/temp:/tmp -d session.save_path=/run/pihole",
+ "bin-path" => "/usr/bin/php-cgi -d session.save_path=/run/pihole",
"socket" => "/tmp/php-fastcgi.sock",
"broken-scriptfilename" => "enable",
"max-procs" => 4,
diff --git a/nginx.pi-hole.conf b/nginx.pi-hole.conf
index 895bc839cce4..a24e38381d7d 100644
--- a/nginx.pi-hole.conf
+++ b/nginx.pi-hole.conf
@@ -1,26 +1,64 @@
# place in /etc/nginx/conf.d/pihole.conf
-server {
+server {
+ listen 80;
+ listen [::]:80;
+ server_name pi.hole;
+
+ root /srv/http/pihole;
+ index index.php;
+
+ if ( $request_uri = / ) {
+ rewrite ^/$ $scheme://$host/admin/ permanent;
+ }
+
+ location /admin {
+ try_files $uri $uri/ /index.php;
+ add_header X-Pi-hole "The Pi-hole Web interface is working!";
+ add_header X-Frame-Options "DENY";
+ }
+
+ 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;
+ }
+}
+
+server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
- root /srv/http/pihole/admin;
+ root /srv/http/pihole;
index index.php;
+ proxy_intercept_errors on;
+ error_page 404 /pihole/index.php;
+
+ if ( $request_uri ~ ^(?!/pihole/)(?!/admin/).*\.js$ ) {
+ rewrite ^.*\.js$ $scheme://$host/pihole/index.js permanent;
+ }
+
location / {
try_files $uri $uri/ /index.php;
+ add_header X-Pi-hole "A black hole for Internet advertisements";
}
- location ~ /\. {
- deny all;
+ location /admin {
+ try_files $uri $uri/ /index.php;
+ add_header X-Pi-hole "The Pi-hole Web interface is working!";
+ add_header X-Frame-Options "DENY";
}
location ~ \.php$ {
+ fastcgi_intercept_errors on;
fastcgi_param HTTP_HOST localhost;
fastcgi_param HTTP_ORIGIN localhost;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
+ fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
include fastcgi.conf;
}
}