apache httpd http basic auth
网站根目录下新建.htaccess:
1 2 3 4 |
AuthName "Welcom to xx.xx.com" AuthType Basic AuthUserFile "/home/wwwroot/xxx.xxx.com/.htpasswd" require valid-user |
创建验证密码.htpasswd:
1 |
htpasswd -c $filename $username |