在.htaccess文件中增加 AuthUserFile /var/www/htpasswd/test.htpasswd AuthName EnterPassword AuthType Basic require valid-user #htpasswd密码文件生成。Create a password file Filename with username as the initial ID. It will prompt for the password htpasswd -c Filename username #Add or modify username2 in the password file Filename htpasswd Filename username2 http://httpd.apache.org/docs/2.2/en/mod/mod_authn_file.html
时间: 2024-10-17 18:11:27