Thursday, October 1, 2015

nginx authorization some files

task :
mail page - authorization
static files - without authorization





location ~* ^.+\.(jpg|jpeg|gif|png|css|rar|doc|xls|exe|pdf|txt|wav|bmp|js|js|mp3|ogg|zip|gz|swf|ico)$ {
            expires     +30d;
            add_header Cache-Control public;
            access_log off;
            satisfy any;
            allow  all;
  }


location / {
            try_files $uri $uri/ /index.php$is_args$args;
            satisfy any;
            allow 8.8.8.8/24;
            deny all;
            auth_basic           "closed site";
            auth_basic_user_file /home/dev/src/ss/public/.htpasswd;
}

No comments:

Post a Comment

grub2-install: error: disk `mduuid/e54081d398c6d57b4d67436f6d032162' not found

After raid 1 disk replacement faced with this issue # grub2-install /dev/sdb Installing for i386-pc platform. grub2-install: error: disk `md...