Advertisement
Guest User

Untitled

a guest
Feb 26th, 2019
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.93 KB | None | 0 0
  1. server {
  2.  
  3.         root /var/www/html;
  4.         server_name betavpn.tk;
  5.         autoindex off;
  6.  
  7.         index pihole/index.php index.php index.html index.htm;
  8.  
  9.         location / {
  10.                 expires max;
  11.                 try_files $uri $uri/ =404;
  12.         }
  13.  
  14.         location ~ \.php$ {
  15.                 include snippets/fastcgi-php.conf;
  16.                 fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  17. #                auth_basic "Restricted"; #For Basic Auth
  18. #                auth_basic_user_file /etc/nginx/.htpasswd;  #For Basic Auth
  19.         }
  20.  
  21.         location /*.js {
  22.                 index pihole/index.js;
  23. #                auth_basic "Restricted"; #For Basic Auth
  24. #                auth_basic_user_file /etc/nginx/.htpasswd;  #For Basic Auth
  25.         }
  26.  
  27.         location /admin {
  28.                 root /var/www/html;
  29.                 index index.php index.html index.htm;
  30. #                auth_basic "Restricted"; #For Basic Auth
  31. #                auth_basic_user_file /etc/nginx/.htpasswd;  #For Basic Auth
  32.         }
  33.  
  34.         location ~ /\.ht {
  35.                 deny all;
  36.         }
  37.  
  38.         error_page 404 /index.php;
  39.         location = /index.php {
  40.                 root /var/www/html/pihole;
  41.                 internal;
  42.         }
  43.  
  44.     listen [::]:443 ssl ipv6only=on; # managed by Certbot
  45.     listen 443 ssl; # managed by Certbot
  46.     ssl_certificate /etc/letsencrypt/live/betavpn.tk/fullchain.pem; # managed by Certbot
  47.     ssl_certificate_key /etc/letsencrypt/live/betavpn.tk/privkey.pem; # managed by Certbot
  48.     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  49.     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  50.  
  51.  
  52. }
  53. server {
  54.     if ($host = betavpn.tk) {
  55.         return 301 https://$host$request_uri;
  56.     } # managed by Certbot
  57.  
  58.         listen 80 default_server;
  59.         listen [::]:80 default_server;
  60.         server_name betavpn.tk;
  61.     return 404; # managed by Certbot
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement