Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

htacess

Posted on 2006-07-09
20
Medium Priority
?
255 Views
Last Modified: 2010-03-04
im trying to use htaccess to secure a directory in apache.

the directory is:

C:\apache\htdocs\lisafinlay\cms

in that directory i have my .htaccess and .htpasswd files with the following content but i cant get it working?

AuthType Basic
AuthName "Secure Directory"
AuthUserFile .htpasswd
Require valid-user

in my httpd.conf file i have this too:

<Directory "W:/Apache/htdocs/lisafinlay/cms">
    AllowOverride All
    Options Indexes Includes
    Order allow,deny
    Allow from all
</Directory>

the error i get is:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

I get the login prompt appear...and i enter my username and password but get the above...

im not great with apache or htaccess so treat me nice if i dont understand you...

im running win xp pro sp2 with apache 2.2
0
Comment
Question by:ellandrd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 6
  • 3
20 Comments
 
LVL 29

Accepted Solution

by:
TeRReF earned 1160 total points
ID: 17070904
YOu need to create the .htpasswd in a certain way. The format is:
frances:WrU808BHQai36
john:iABCQFQs40E8M
lisa:FAdHN3W753sSU

You can find an online tool here to create the right entries for you:
http://www.4webhelp.net/us/password.php
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17070922
i have my htpasswd created:

seandelaney:oGGr2f6ISfGLI
lisafinlay:cuk9wgx16Ze0g

but i keep getting a server error.

i have tried all this online tools, but i think i keep getting my path wrong!

path of directory i want to protect is:

W:/Apache/htdocs/lisafinlay/cms/

path of directory where .htpasswd file is:

W:/Apache/htdocs/lisafinlay/private/

My .htaccess file is located in:

W:/Apache/htdocs/lisafinlay/cms/


 
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17070934
here is my .htaccess file:

AuthType Basic
AuthName "Secure Directory"
AuthUserFile /private/.htpasswd
Require valid-user
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 16

Author Comment

by:ellandrd
ID: 17071006
TeRReF

Can you help me please?  You have not replied...
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 17071069
Sorry, I have some work to do as well :)

Have a look in the server log, it tells you more about the cause of the error, post what you see and it will be easier to help you...

I don't know if it is a typo, but in your original question you use both C: and W:. Are you using both?

0
 
LVL 16

Author Comment

by:ellandrd
ID: 17071081
no im only using W:\ drive...  the C was a typo - sorry for the confusion...
0
 
LVL 29

Assisted Solution

by:TeRReF
TeRReF earned 1160 total points
ID: 17071096
No prob, did you check your server log already?
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17071169
there was nothing to indicate what is causing it...
0
 
LVL 4

Assisted Solution

by:Tol_cv
Tol_cv earned 840 total points
ID: 17071569

for AuthUserFile  you should use the full path instead of /private/.htpasswd.
also if doesn;t work. try:
 Require user seandelaney lisafinlay , instead of Require valid-user
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17071588
when you say full path? im not sure about what is correct?

do you mean:

W:/Apache/htdocs/lisafinlay/private/.htpasswd ?
0
 
LVL 29

Assisted Solution

by:TeRReF
TeRReF earned 1160 total points
ID: 17071637
Yep, that's what he means... by the way, isn't it:
W:\Apache\htdocs\lisafinlay\private\.htpasswd
under windows?
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17071708
i dunno? - i dont have any knowledge of apache...or htacess
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17071723
ok, now i get prompted to re-enter my username and password even after i enter them...  its not redirecting me to the secure page...
0
 
LVL 29

Assisted Solution

by:TeRReF
TeRReF earned 1160 total points
ID: 17071737
Are you sure you use a valid username/passwd combination?
0
 
LVL 4

Assisted Solution

by:Tol_cv
Tol_cv earned 840 total points
ID: 17071764
are there an errors  in logs ? the page you get says  error 401  authentification required? if yes username or password is wrong....
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17071783
no i dont get any page as when i enter my username and password, the prompt appears again asking me to re-enter them.

if i click cancel i get authorisation required error...
0
 
LVL 4

Assisted Solution

by:Tol_cv
Tol_cv earned 840 total points
ID: 17071806
that means  bad username/passwd combination.
are you using  Require user seandelaney lisafinlay  of REquire valid-user ?
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17071845
ive tired both
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17071846
tried*
0
 
LVL 29

Assisted Solution

by:TeRReF
TeRReF earned 1160 total points
ID: 17072008
Maybe you can try using some configuration program like this:
http://www.apache-gui.com/apache-windows.html
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question