Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- fastcgi_buffer_size 32k;
- fastcgi_buffers 4 32k;
- listen 8081;
- server_name project.local;
- root /var/www;
- index index.php index.html;
- location ~ /\.ht {
- deny all;
- }
- auth_basic "L3";
- auth_basic_user_file /etc/nginx/.htpasswd;
- ###################################### NON AUTHORIZED AREA##################
- location = /ALLscan.php {
- auth_basic off;
- fastcgi_index index.php;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- ######################################
- location ~ /(L3|lite).+\.php$ {
- try_files $uri = 404;
- fastcgi_index index.php;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- # serve static files directly
- location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
- auth_basic off;
- access_log off;
- log_not_found off;
- expires max;
- }
- location / {
- auth_basic "Restricted Area";
- auth_basic_user_file /etc/nginx/.htpasswd2;
- }
- location ~ \.php$ {
- auth_basic "Restricted Area";
- auth_basic_user_file /etc/nginx/.htpasswd2;
- try_files $uri = 404;
- fastcgi_index index.php;
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement