Advertisement
Guest User

Pi-hole Nginx

a guest
Sep 23rd, 2015
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.83 KB | None | 0 0
  1. server {
  2.     listen   80; ## listen for ipv4; this line is default and implied
  3.     #listen   [::]:80 default_server ipv6only=on; ## listen for ipv6
  4.  
  5.     root /srv/http/pihole/;
  6.     index index.html index.htm index.php;
  7.  
  8.     # Make site accessible from http://localhost/
  9.     server_name localhost;
  10.  
  11.     location / {
  12.         # First attempt to serve request as file, then
  13.         # as directory, then fall back to displaying a 404.
  14.         try_files $uri $uri/ /index.html;
  15.         # Uncomment to enable naxsi on this location
  16.         # include /etc/nginx/naxsi.rules
  17.     }
  18.     location ~ \.php$ {
  19.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  20.         # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  21.    
  22.         # With php5-cgi alone:
  23.         # fastcgi_pass 127.0.0.1:9000;
  24.         # With php5-fpm:
  25.         fastcgi_pass unix:/var/run/php5-fpm.sock;
  26.         fastcgi_index index.php;
  27.         include fastcgi_params;
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement