.htacess authentication problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

.htacess authentication problem

Postby jsfairchild » 02. May 2010 20:07

I am trying to setup a simple .htaccess/.htpasswd authentication for a file. I am getting an Internal Server error when I upload the files to my actual website, so I thought I'd try it on XAMPP. I get the same error. The error occurs after the username/password box appears and I hit OK. Whether the username/password is correct or incorrect doesn't matter. Here's my .htaccess:

<Files students.txt>
AuthName "Admin"
AuthType Basic
AuthUserFile .htpasswd
require valid-user
</Files>

and my .htpasswd:

xauva99:kM0w.PXR81H2U

.htaccess, .htpasswd, and students.txt are all in my \xampp\htdocs folder.

"LoadModule rewrite_module modules/mod_rewrite.so" is enabled...I read that not enabling it is a common problem.


Here is my actual error:

"Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
localhost
5/2/2010 3:04:10 PM
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1"

I'm at a loss right now, so any help would be great!

Regards,
Josh
jsfairchild
 
Posts: 1
Joined: 02. May 2010 19:57

Re: .htacess authentication problem

Postby WilliL » 02. May 2010 21:58

try:
AuthUserFile DRV:/xampp/htdocs/.htpasswd

it must be the physical path name
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 152 guests