[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

.htaccess protection won't accept my password

Posted on 2011-09-19
9
Medium Priority
?
342 Views
Last Modified: 2012-08-13
I followed these instructions exactly to protect a folder on my website:
http://www.elated.com/articles/password-protecting-your-pages-with-htaccess/

When trying to access a file within that folder via my browser, I am prompted for username and password but the username and password I chose does not work.

How do I fix this?
0
Comment
Question by:lukeprog
[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
9 Comments
 
LVL 9

Expert Comment

by:parparov
ID: 36563640
Is your AuthUserFile pointing to a correct passwd file?
Is this passwd file readable by apache?

If you can paste here:
* .htaccess contents
* passwd file contents
* passwd file permissions

that may prove helpful.
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36563644
Paste your .htaccess file please.
0
 

Author Comment

by:lukeprog
ID: 36563691
.htaccess:

AuthUserFile /domains/lukeprog.com/html/Friendly-AI.com/.htpasswd
AuthType Basic
AuthName "My Secret Folder"
Require valid-user

Open in new window


.htpasswd:

gogogo:UZQy3VXatVBHE

Open in new window


(I'll change the username and password later; not a big deal.)

Permissions on both files are currently 777.

Web page is:
http://lukeprog.com/Friendly-AI.com/index.html

0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 9

Expert Comment

by:parparov
ID: 36563813
You need to "AllowOverride AuthConfig" in your apache configuration for this protected directory. And restart apache after this modification.

And if you don't mind, what was the original password? What we see is the encrypted version.

You may also have the error message in your apache error log.
0
 

Author Comment

by:lukeprog
ID: 36563834
Original password is:

turing

Open in new window


What do I do in the Apache configuration? Not sure where that is. Does this screenshot give you any guesses?
Screen-Shot-2011-09-19-at-3.19.5.png
0
 
LVL 9

Expert Comment

by:parparov
ID: 36563937
Oh, you're running on a hosting.

I am not familiar enough with panels of hosting services; you may find it easier to ask the hosting provider about the issue. Sometimes the hosting providers have explicit instructions on .htaccess setup.
0
 
LVL 6

Accepted Solution

by:
jjperezaguinaga earned 2000 total points
ID: 36570294
Greetings lukeprog,

Try to set up your .htaccess options in the following order:

AuthName
AuthType
AuthUserFile
Require valid-user

Also, I'm pretty sure your AuthUserFile is wrong, as you include a .com in the path where an absolute path your file should be provided. For instance, my path is something like this

/home/content/a/b/c/albocar/.htpasswd

and my sites are on

/home/content/a/b/c/albocar/html/_sites/site1
/home/content/a/b/c/albocar/html/_sites/site2/.htacess (protected site)

What worked for me is that I put the .htpasswd in the root file of my web server, (the first directory that appears when you FTP your account) and copied the absolute path from the ftp path. If you need help to know what's your absolute path, you can get a FTP client such as FileZilla or ask your hosting provider for help.

Best regards,
-JJ
0
 
LVL 13

Expert Comment

by:LinuxGuru
ID: 36592093
Could you let me know the name of your hosting control panel? Is it Plesk panel or Direct admin or something like that? From the screenshot I'm unable to determine the name of your hosting control panel.
0
 

Author Closing Comment

by:lukeprog
ID: 36593135
Thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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). #…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
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
Course of the Month13 days, 21 hours left to enroll

656 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