• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

.htaccess Responding - .passwd Failing

I'm told by my web host that my domain resides on an apache server.  I've read numerous tutorials to learn how to create .htaccess and .htpasswd files with the hope of offering controlled access to one folder within my domain.  Tech support does not offer assistance in this area, although I've been told by tech support that the server will respond to these files.

I have created both files being careful to use the syntax in the tutorials but have unsuccessful at gaining access to the restricted area.  It appears that .htaccess works (based on recognition of AuthName that I'm using). I've used several web-based sites to create encrypted passwords and pasted the results into my .htpasswd file using the recommended syntax. Permissions have been set at 644 for both files.  I've transferred them as ASCII files, etc.

I'm working on the premise that the problem is either the path to the password file in .htaccess is incorrect or that my webhost somehow prevents the use of these files in spite of what I'm told.  For the path, I've used "/folderwithpassword/.htpasswd" and "htpp://www.mydomain.com/folderwithpassword/.htpasswd" with no luck. Is it likely the problem may be the host or am I overlooking something?

Thanks for your assistance.
0
OTRRonnie
Asked:
OTRRonnie
1 Solution
 
periwinkleCommented:
The path to the password file should be the full path to that file from the root of the server;  it is likely something like:

/home/yourname/web/.htpasswd

or the like.

The password file should be OUTSIDE the web hierarchy if at all possible.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now