Problem with .htaccess & .htpasswd

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

Problem with .htaccess & .htpasswd

Postby MalastiC » 02. November 2008 11:47

Good morning. I want to password protect the folder statistics XAMPP. I renamed and is now called stats.

My home directory is: opt/lampp/htdocs

I made a file: .htpasswd with this:

Code: Select all
user1:0.S9.iQIhYTWBY
user2:8vjUaROTxrEtzk


And i put in /opt/lampp/htdocs/stats

Now i made a file: .htaccess with this:

Code: Select all
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /stats/.htpasswd
AuthGroupFile /dev/null
require valid-user


And i put in /opt/lampp/htdocs

The server say me "Error 500"

I'm doing something wrong insurance, but is not it.

A greeting,
MalastiC
 
Posts: 13
Joined: 31. October 2008 09:35

Postby Kristian Marcroft » 02. November 2008 12:16

Hi,

try using the full path for:

Code: Select all
AuthUserFile /stats/.htpasswd


Try something like:

Code: Select all
AuthUserFile /opt/lampp/htdocs/stats/.htpasswd


By the way. The .htaccess file has to reside in the directory you wish to protect.
The .htpasswd File may reside any where else.

Regards,
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby MalastiC » 02. November 2008 12:30

Is working.
:D
Thank you very much again.
MalastiC
 
Posts: 13
Joined: 31. October 2008 09:35

Postby Wiedmann » 02. November 2008 13:18

Is working.

Fine.

Just another hint:
The server say me "Error 500"

In Apaches' error_log you can find the answer for your question.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 61 guests