If you use the htaccess and htpasswd to protect the directory on Apache, please see the below 1. Modify the /etc/httpd/conf/httpd.conf Enable those module mod_authn_file.so mod_authz_user.so mod_authz_owner.so mod_authz_groupfile.so 2. edit htaccess AuthUserFile /var/www/html/test/.htpasswd AuthGroupFile /dev/null AuthName "Sample" AuthType Basic require valid-user 3. htpasswd -b .htpasswd $user $password 4. restart apache if you see the error message "Internal Server Error" via browser and "'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration" in error_log please see the apache configure file, if those modules enables.
文章標籤
全站熱搜
創作者介紹
創作者 coolkevin 的頭像
coolkevin

about my life

coolkevin 發表在 痞客邦 留言(0) 人氣(0)