fairyguo 发表于 2018-11-14 06:25:23

Nginx指定IP无须通过认证

server {  
      listen 0.0.0.0:80;
  
      server_name
  
      location ~ / {
  
                satisfy any;
  
                allow 192.168.1.0/24;
  
                deny all;
  
                auth_basic "Account Authentication";
  
                auth_basic_user_file passwd;
  
                root /var/www/html;
  
                index index.html;
  
      }


页: [1]
查看完整版本: Nginx指定IP无须通过认证