Solved

.htaccess protection won't accept my password

Posted on 2011-09-19
9
333 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
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
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

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…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

896 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now