Created
February 13, 2019 06:33
-
-
Save theel0ja/7f13c1aa18eaa2e363265b8d261a91ad to your computer and use it in GitHub Desktop.
/etc/nginx/sites-available/pi.hole
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; | |
server_name pi.hole; | |
allow 192.0.2.15; | |
deny all; | |
root /var/www/html; | |
# Add index.php to the list if you are using PHP | |
index index.php index.html; | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to displaying a 404. | |
try_files $uri $uri/ =404; | |
} | |
location ~ \.php$ { | |
include snippets/fastcgi-php.conf; | |
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Used on Raspbian GNU/Linux 9.6 (stretch)