Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Cannot get .htaccess to work |
|
Author |
|
hishighness
Joined: 20 Apr 2009 Posts: 2
|
Posted: Mon 20 Apr '09 2:35 Post subject: Cannot get .htaccess to work |
|
|
Hey everyone, I've tried generators and tutorials and for the life of me I just can't seem to password protect my folders with htacccess.
I'm running Apache on my home computer so I can access files from my work computer. Obviously being a work computer they don't allow me to install things like iTunes so my idea was to have iTunes set up to automatically update in to the Apache home folder and that way I can access all my latest podcasts in one place easily from a web page. Also I have my regular Mp3 collection and some TV shows I've ripped from DVD, but I want to password protect it all so only I have access to it so someone doesn't stumble on to it and I get a threatening letter from the RIAA or the MPAA or something.
No matter what I do I can't get the login box to appear. Is there something I'm supposed to do in httpd.conf or something first?
I looked in the error log and this is what I got.
Quote: | [Sun Apr 19 20:16:18 2009] [error] [client 24.224.203.152] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/secure/.htaccess, referer: http://24.224.203.152/
[Sun Apr 19 20:16:18 2009] [error] [client 24.224.203.152] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/secure/.htpasswd, referer: http://24.224.203.152/ |
Here's my current .htaccess file
Quote: | AuthUserFile c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/secure/.htpasswd
AuthName "Access Restricted"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit> |
Any help that could be offered would be greatly appreciated, and thanks for taking the time to read this.  |
|
Back to top |
|
glsmith Moderator

Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Mon 20 Apr '09 4:16 Post subject: |
|
|
put quotes around c:/pro...
AuthUserFile "c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/secure/.htpasswd"
Apache is not seeing anything past Program
c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/secure/.htpasswd and that is it |
|
Back to top |
|
hishighness
Joined: 20 Apr 2009 Posts: 2
|
Posted: Mon 20 Apr '09 4:46 Post subject: |
|
|
I just tried that and I still have the same problem. Is there any other info I can provide to help?
Update, I actually figured it out thanks to a Google search for "Apache .htaccess troubleshooting"
I didn't have the AllowOverride option in http.conf set to All
So in case anyone ever has this problem again
Quote: | # AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None |
should be changed in http.conf to read
Quote: | # AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All |
Thanks again to glsmith, what you said was another problem I had so it also helped a lot. |
|
Back to top |
|
|
|
|
|
|