1

Hi trying to password protect my wordpress website by using .htaccess & .htpasswd, but i keep getting an error "500 Internal Server Error"

I think its because of the AuthUserFile part of the .htaccess file.

on my wordpress header i have entered the following php code to get the current directory

<?php echo getcwd(); ?>

and it returns as:

/var/sentora/hostdata/zadmin/public_html/domain_com

this is my .htaccess file. maybe you guys can figure it out.

AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /var/sentora/hostdata/zadmin/public_html/domain_com/.htpasswd 
AuthGroupFile /dev/null 
require valid-user

also, the .htaccess & the .htpasswd files are both in the /domain_com directory.

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
R4zerx420
  • 11
  • 4
  • Remove `AuthGroupFile /dev/null` . Is your .htpasswd file created properly? – Petr Duchek Nov 30 '14 at 14:23
  • I removed AuthGroupFile and it then asked for username and password, but when i entered the username and password it just said internal server error again. And it wont ask again unless i clear cache. And Yes im pretty sure the .htpasswd file is setup correctly. It just looks like this: testing:$apr1$3rgql2e5$KfVGiIpX3I2Z7DQ/39Q0Y0 – R4zerx420 Nov 30 '14 at 14:50
  • Check your Apache error.log when 500 came. – anubhava Dec 01 '14 at 05:37

0 Answers0