Solved

.htaccess protection won't accept my password

Posted on 2011-09-19
9
339 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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 500 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
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…

705 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