-     server {
 
 -         listen       443 ssl;
 
 -         server_name  book.com;
 
  
-         ssl_certificate      cert.pem;
 
 -         ssl_certificate_key  cert.key;
 
  
-         ssl_session_cache    shared:SSL:1m;
 
 -         ssl_session_timeout  5m;
 
  
-         ssl_ciphers  HIGH:!aNULL:!MD5;
 
 -         ssl_prefer_server_ciphers  on;
 
 -         location / {
 
 -             root C:\website\book;
 
 -             index  index.htm index.html index.php;
 
 -                     }
 
 -          location /加密书籍 {  
 
 -         # 基本验证
 
 -          root C:\website\book;
 
 -         index  index.htm index.html index.php;
 
 -         auth_basic "nginx basic auth";
 
 -         auth_basic_user_file C:\website\auth.txt;
 
 -  }
 
 -     }
 
 -  
 
  
  复制代码 
密码文件生成网址 
[color=var(--external-link)]https://tool.oschina.net/htpasswd 
选择方式md5 
auth.txt认证文件格式 
 |