LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-13-2009, 10:03 PM   #1
mlapl1
LQ Newbie
 
Registered: Jun 2007
Posts: 16

Rep: Reputation: 0
Internal Server Error with Password protection of directory using .htaccess/.htpasswd


I have a website that works perfectly well.

I decided to password-protect it using .htaccess/.htpasswd.

The password protection works fine but the website no longer works. I now get an Internal Server Error (Error 500). The protected directory is underneath the root of the web server (Apache 2.x) but two directories up from the root of the actual website itself - which is in a sub-dirrectory of the main site.

I have a barebones .htaccess/.htpasswd combination.

Any advice???

Thank you
Andrew
 
Old 10-14-2009, 12:12 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,043

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
Quote:
The protected directory is underneath the root of the web server (Apache 2.x) but two directories up from the root of the actual website itself - which is in a sub-dirrectory of the main site.
Could you elaborate a bit? What is the DocumentRoot of the website and what is the DocumentRoot of the main site?
You should know that .htaccess is used recursively for any subdirectory underneath the one it's placed. You should also take a look at the apache error_log for more info on the error.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess password protection not working m0ntassar Linux - Newbie 3 06-04-2009 02:02 PM
.htaccess .htpasswd plisken Linux - General 5 05-21-2006 01:44 PM
apache .htaccess and htpasswd - can't lock directory jordanthompson Linux - Software 9 02-07-2005 11:12 PM
Directory password protection scootz6 Linux - Security 2 03-25-2004 02:04 PM
Help with .htpasswd and .htaccess MikeeX Linux - General 3 03-25-2003 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration