#生成账户对应的密码信息

htpasswd -c /etc/httpd/conf/httpspasswd.user httpsadmin


#apache中的设定[非192.168.1的网段,需用户验证的方式访问]

AuthName "Https Access"

AuthType Basic

AuthUserFile /etc/httpd/conf/httpspasswd.user

Require valid-user

Satisfy any 

Order Deny,Allow 

Deny from all 

Allow from 192.168.1