SHARE
TWEET

Untitled

a guest Jan 17th, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     fastcgi_buffer_size 32k;
  3.     fastcgi_buffers 4 32k;
  4.     listen 8081;
  5.     server_name project.local;
  6.     root /var/www;
  7.     index index.php index.html;
  8.  
  9.     location ~ /\.ht {
  10.         deny all;
  11.     }
  12.  
  13.     auth_basic "L3";
  14.     auth_basic_user_file /etc/nginx/.htpasswd;
  15.  
  16.     ###################################### NON AUTHORIZED AREA##################
  17.     location = /ALLscan.php {
  18.         auth_basic off;
  19.         fastcgi_index index.php;
  20.         fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  21.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22.         include fastcgi_params;
  23.     }
  24.     ######################################
  25.  
  26.     location ~ /(L3|lite).+\.php$ {
  27.         try_files $uri = 404;
  28.         fastcgi_index index.php;
  29.         fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  30.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  31.         include fastcgi_params;
  32.     }
  33.  
  34.     # serve static files directly
  35.     location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
  36.         auth_basic off;
  37.         access_log off;
  38.         log_not_found off;
  39.         expires max;
  40.     }
  41.  
  42.     location / {
  43.         auth_basic "Restricted Area";
  44.         auth_basic_user_file /etc/nginx/.htpasswd2;
  45.     }
  46.  
  47.     location ~ \.php$ {
  48.         auth_basic "Restricted Area";
  49.         auth_basic_user_file /etc/nginx/.htpasswd2;
  50.         try_files $uri = 404;
  51.         fastcgi_index index.php;
  52.         fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  53.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  54.         include fastcgi_params;
  55.     }
  56.    
  57. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top