LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > Password Protect A File

Reply
 
Thread Tools Display Modes
  #1  
Old 09-08-2006, 09:35 PM
bambito bambito is offline
New Member
 
Join Date: Sep 2006
Posts: 9
Default Password Protect A File

I'm trying to password protect a file.

I tried it by .htaccess and by the admin interface in litespeed. No dice

If done by .htaccess, I get a 401 and no login box to authenticate to.

Example:
<Files admin.php>
AuthName "Restricted"
AuthType Basic
AuthUserFile /home/usernamedirectory/.staccess
Require valid-user
</Files>

If I use Auth Realm and Context for that specific vhost, authentication works. But instead of directing me to the admin.php file, it directs me to http://site.com/admin.php/, which shows the frontpage of the website. What am I doing wrong?

Example:
"Vhost Security Option Tab"
Realm Name Restricted
User DB Location /home/usernamedirectory/.staccess
User DB Max Cache Size N/A
User DB Cache Timeout (secs) N/A
Group DB Location N/A
Group DB Max Cache Size N/A
Group DB Cache Timeout (secs) N/A

"Vhost Context Option Tab"
URI /admin.php
Location /home/usernamedirectory/public_html
Accessible Yes
Enable Expires N/A
Expires Default N/A
Expires By Type N/A
Extra Headers N/A
MIME Type N/A
Force MIME Type N/A
Default MIME Type N/A
Index Files N/A
Auto Index N/A
Allow Override N/A
Realm Restricted
Authentication Name N/A
Required user user1, user2, user3, etc.
Access Allowed N/A
Access Denied N/A
Authorizer N/A
Add Default Charset Off
Customized Default Charset N/A
Enable Rewrite N/A
Rewrite Inherit N/A
Rewrite Base N/A
Rewrite Rules N/A
Apache Style configurations N/A

Thanks!
Reply With Quote
  #2  
Old 09-08-2006, 10:32 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
I will answer the second part right now.

Code:
URI /admin.php
Location /home/usernamedirectory/public_html
should be:

Code:
URI /admin.php
Location /home/usernamedirectory/public_html/admin.php
Initially you have /admin.php the uri bound to the root www directory of your site which explains why you are getting the homepage. URI is the matching field and Location is the path of the content URI points to.
Reply With Quote
  #3  
Old 09-09-2006, 02:08 AM
bambito bambito is offline
New Member
 
Join Date: Sep 2006
Posts: 9
Thanks! I don't know why I didn't see that earlier. I feel like a certified village idiot.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lot's of Failed to open file hichew Install/Configuration 4 04-28-2007 11:15 AM
Uploading files / tmp file creation BuhBompus PHP 10 12-07-2006 08:49 AM
Problem: Install password protected SSL certificate clark1 Install/Configuration 2 09-30-2006 10:11 PM
Problem installing LiteSpeed 2.2.1 Standard on UNIX perezsy Install/Configuration 17 09-22-2006 09:53 AM
Generating the user password file for .htaccess usage... dnebing Install/Configuration 2 03-15-2004 09:52 AM


All times are GMT -7. The time now is 12:29 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.