diff options
author | max.bra | 2023-02-06 17:18:10 +0100 |
---|---|---|
committer | max.bra | 2023-02-06 17:18:10 +0100 |
commit | 3f3afebff27bde90d88f17ed19a732951db538c2 (patch) | |
tree | f9728b0b8a56b3d91374f360ddc7f392965f3c11 | |
parent | a489504e74ef445caf6f3eacf262ee51ac8eeffe (diff) | |
download | aur-3f3afebff27bde90d88f17ed19a732951db538c2.tar.gz |
better nginx conf file
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 3 | ||||
-rw-r--r-- | nginx.pi-hole.conf | 72 |
3 files changed, 33 insertions, 48 deletions
@@ -31,8 +31,8 @@ pkgbase = pi-hole-server backup = etc/sudoers.d/pihole source = pi-hole-server-core-5.15.3.tar.gz::https://github.com/pi-hole/pi-hole/archive/v5.15.3.tar.gz source = pi-hole-server-admin-5.18.3.tar.gz::https://github.com/pi-hole/AdminLTE/archive/v5.18.3.tar.gz - source = arch-server-core-5.15.3-400705960.patch::https://raw.githubusercontent.com/max72bra/pi-hole-server-archlinux-customization/master/arch-server-core-5.15.3.patch - source = arch-server-admin-5.18.3-400705960.patch::https://raw.githubusercontent.com/max72bra/pi-hole-server-archlinux-customization/master/arch-server-admin-5.18.3.patch + source = arch-server-core-5.15.3-568108550.patch::https://raw.githubusercontent.com/max72bra/pi-hole-server-archlinux-customization/master/arch-server-core-5.15.3.patch + source = arch-server-admin-5.18.3-568108550.patch::https://raw.githubusercontent.com/max72bra/pi-hole-server-archlinux-customization/master/arch-server-admin-5.18.3.patch source = dnsmasq.include source = lighttpd.pi-hole.conf source = nginx.pi-hole.conf @@ -50,7 +50,7 @@ pkgbase = pi-hole-server sha256sums = 2e336c96b3c5b7887a031e854185920885404e5107e7acdba4dc133c5dcedab4 sha256sums = 96c1fb8b15e1d0e99c18dc768f5dc3d4991184fb2631af84c5e2111028bc5287 sha256sums = 3a3baa92a635d602824f184d901e947a0e14650c950e89325dda6f7d71b39db9 - sha256sums = 28bbc99230b961032eeaec515d3dd06778c99b21e3a9c2401e19992edd1af6c3 + sha256sums = f5906ed845e030ee18baeb8767295e1a76848a10ffd6fe60d34501ae45e2b6a8 sha256sums = 6da6bba6cfac4e87a1f1e8e1488b71858ac6feb0a2e327470a58d8f1e9ad8cbf sha256sums = 9b72d7769036f8f4bb7121968d2ae4bdba427e4b16787ce340205a5f62b45c7c sha256sums = 5228b4f923eab7784952a0fd6da895e7bff2f80a7f91c4a7c6350491dfdbb2e8 @@ -1,5 +1,6 @@ # Maintainer: max.bra <max dot bra dot gtalk at gmail dot com> # Maintainer: graysky <therealgraysky AT protonmail DOT com> +# Contributor: disprofarma <garmengol AT disprofarma DOT com DOT ar> pkgname=pi-hole-server _pkgname=pi-hole @@ -48,7 +49,7 @@ sha256sums=('961f9dc6c5b1e25f0f5cd6ca4c4c7390cc791a0005ade40da9d062b83b111bcc' '2e336c96b3c5b7887a031e854185920885404e5107e7acdba4dc133c5dcedab4' '96c1fb8b15e1d0e99c18dc768f5dc3d4991184fb2631af84c5e2111028bc5287' '3a3baa92a635d602824f184d901e947a0e14650c950e89325dda6f7d71b39db9' - '28bbc99230b961032eeaec515d3dd06778c99b21e3a9c2401e19992edd1af6c3' + 'f5906ed845e030ee18baeb8767295e1a76848a10ffd6fe60d34501ae45e2b6a8' '6da6bba6cfac4e87a1f1e8e1488b71858ac6feb0a2e327470a58d8f1e9ad8cbf' '9b72d7769036f8f4bb7121968d2ae4bdba427e4b16787ce340205a5f62b45c7c' '5228b4f923eab7784952a0fd6da895e7bff2f80a7f91c4a7c6350491dfdbb2e8' diff --git a/nginx.pi-hole.conf b/nginx.pi-hole.conf index f826f95d58c0..5ebede10b781 100644 --- a/nginx.pi-hole.conf +++ b/nginx.pi-hole.conf @@ -1,46 +1,30 @@ -# -# /etc/nginx/conf.d/pihole.conf -# -# https://github.com/pi-hole/pi-hole/wiki/Nginx-Configuration -# - server { - listen 80 default_server; - listen [::]:80 default_server; - - root /srv/http/pihole; - server_name _; - autoindex off; - - proxy_intercept_errors on; - - index index.php index.html index.htm; - - location / { - expires max; - return 301 /admin/; - } - - location ~ \.php$ { - include fastcgi.conf; - fastcgi_intercept_errors on; - fastcgi_pass 127.0.0.1:9000; - fastcgi_param SERVER_NAME $host; - } - - location /admin { - root /srv/http/pihole; - index index.php index.html index.htm; - add_header X-Pi-hole "The Pi-hole Web interface is working!"; - add_header X-Frame-Options "DENY"; - } - - location ~ /\.ttf { - add_header Access-Control-Allow-Origin "*"; - } - - location ~ /\.ht { - deny all; - } + 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; } } - |