.htaccess file not working
.htaccess file not working
am 24.12.2007 22:22:43 von Vladimir Tserijemiwtz
I created a directory in my webserver's document directory. In this
directory I created a .htaccess file using the instructions at
http://httpd.apache.org/docs/1.3/howto/auth.html
I also created the password file using htpasswd. This HOWTO seems to say
that if I place the .htaccess file in this directory it will prompt me for a
password. It also appears to be saying that I don't need to edit the
httpd.conf file nor restart Apache.
So I access this folder from one of the machines on the LAN and poof, I'm
in. No password prompt appears at all.
Can someone tell me what I did wrong?
Re: .htaccess file not working
am 24.12.2007 22:24:43 von Wietse Muizelaar
On 2007-12-24, Vladimir Tserijemiwtz wrote:
> I created a directory in my webserver's document directory. In this
> directory I created a .htaccess file using the instructions at
>
> http://httpd.apache.org/docs/1.3/howto/auth.html
>
> I also created the password file using htpasswd. This HOWTO seems to say
> that if I place the .htaccess file in this directory it will prompt me for a
> password. It also appears to be saying that I don't need to edit the
> httpd.conf file nor restart Apache.
>
> So I access this folder from one of the machines on the LAN and poof, I'm
> in. No password prompt appears at all.
>
> Can someone tell me what I did wrong?
Do you have the AllowOverride setting in the httpd.conf?
--
Cheers,
Wietse
Re: .htaccess file not working
am 24.12.2007 22:31:24 von Vladimir Tserijemiwtz
"Wietse Muizelaar" wrote in message
news:slrnfn08sn.8fk.wietse.muizelaar@localhost.localdomain.. .
> On 2007-12-24, Vladimir Tserijemiwtz wrote:
>> I created a directory in my webserver's document directory. In this
>> directory I created a .htaccess file using the instructions at
>>
>> http://httpd.apache.org/docs/1.3/howto/auth.html
>>
>> I also created the password file using htpasswd. This HOWTO seems to say
>> that if I place the .htaccess file in this directory it will prompt me
>> for a
>> password. It also appears to be saying that I don't need to edit the
>> httpd.conf file nor restart Apache.
>>
>> So I access this folder from one of the machines on the LAN and poof, I'm
>> in. No password prompt appears at all.
>>
>> Can someone tell me what I did wrong?
>
> Do you have the AllowOverride setting in the httpd.conf?
>
> --
> Cheers,
> Wietse
My httpd.conf file has this line in it:'
AllowOverride None
Is this what you mean? Should I change it to AlllowOverride All or
something.
Re: .htaccess file not working
am 24.12.2007 22:36:53 von Wietse Muizelaar
On 2007-12-24, Vladimir Tserijemiwtz wrote:
>
> "Wietse Muizelaar" wrote in message
> news:slrnfn08sn.8fk.wietse.muizelaar@localhost.localdomain.. .
>> On 2007-12-24, Vladimir Tserijemiwtz wrote:
>>> I created a directory in my webserver's document directory. In this
>>> directory I created a .htaccess file using the instructions at
>>>
>>> http://httpd.apache.org/docs/1.3/howto/auth.html
>>>
>>> I also created the password file using htpasswd. This HOWTO seems to say
>>> that if I place the .htaccess file in this directory it will prompt me
>>> for a
>>> password. It also appears to be saying that I don't need to edit the
>>> httpd.conf file nor restart Apache.
>>>
>>> So I access this folder from one of the machines on the LAN and poof, I'm
>>> in. No password prompt appears at all.
>>>
>>> Can someone tell me what I did wrong?
>>
>> Do you have the AllowOverride setting in the httpd.conf?
>>
>
> My httpd.conf file has this line in it:'
>
> AllowOverride None
>
> Is this what you mean? Should I change it to AlllowOverride All or
> something.
Yep. This means .htaccess-files aren't allowed. See
http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride for
possible values; and pick the one you prefer.
--
Cheers,
Wietse
Re: .htaccess file not working
am 24.12.2007 23:26:57 von Vladimir Tserijemiwtz
"Wietse Muizelaar" wrote in message
news:slrnfn09jh.8fk.wietse.muizelaar@localhost.localdomain.. .
> On 2007-12-24, Vladimir Tserijemiwtz wrote:
>>
>> "Wietse Muizelaar" wrote in message
>> news:slrnfn08sn.8fk.wietse.muizelaar@localhost.localdomain.. .
>>> On 2007-12-24, Vladimir Tserijemiwtz wrote:
>>>> I created a directory in my webserver's document directory. In this
>>>> directory I created a .htaccess file using the instructions at
>>>>
>>>> http://httpd.apache.org/docs/1.3/howto/auth.html
>>>>
>>>> I also created the password file using htpasswd. This HOWTO seems to
>>>> say
>>>> that if I place the .htaccess file in this directory it will prompt me
>>>> for a
>>>> password. It also appears to be saying that I don't need to edit the
>>>> httpd.conf file nor restart Apache.
>>>>
>>>> So I access this folder from one of the machines on the LAN and poof,
>>>> I'm
>>>> in. No password prompt appears at all.
>>>>
>>>> Can someone tell me what I did wrong?
>>>
>>> Do you have the AllowOverride setting in the httpd.conf?
>>>
>>
>> My httpd.conf file has this line in it:'
>>
>> AllowOverride None
>>
>> Is this what you mean? Should I change it to AlllowOverride All or
>> something.
>
> Yep. This means .htaccess-files aren't allowed. See
> http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride for
> possible values; and pick the one you prefer.
>
> --
> Cheers,
> Wietse
Thanks for your help.. I really hate to be a pain but this is just not
working. Let me see if I explain it very carefully because something is just
not working. Remember I'm running 1.3
1. I executed the command htpasswd -c /path/to/passwdfile fred
2. I entered and confirmed the password for user fred
3. I then created an .htaccess file in the folder I want to protect
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /path_to/passwd_file
Require user fred
4. I edited the httpd.conf file
Options FollowSymLinks
AllowOverride All
5. I then restarted Apache
The folder is still wide open. No password prompt appears. I cleared the
cache in the browser but got the same thing.
I even tried to lock down the actual folder in httpd.conf like this
AllowOverride All
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /home/frank/incoming/misc/appass
Require user fred
This at least asked for a password but then refused entry even though I was
using the correct password and username.
Any advice would be helpful.
5. I
Re: .htaccess file not working
am 24.12.2007 23:33:39 von Vladimir Tserijemiwtz
"Vladimir Tserijemiwtz" wrote in message
news:OI2dnXLf8c6vr-3anZ2dnUVZ_uCinZ2d@comcast.com...
> "Wietse Muizelaar" wrote in message
> news:slrnfn09jh.8fk.wietse.muizelaar@localhost.localdomain.. .
>> On 2007-12-24, Vladimir Tserijemiwtz wrote:
>>>
>>> "Wietse Muizelaar" wrote in message
>>> news:slrnfn08sn.8fk.wietse.muizelaar@localhost.localdomain.. .
>>>> On 2007-12-24, Vladimir Tserijemiwtz wrote:
>>>>> I created a directory in my webserver's document directory. In this
>>>>> directory I created a .htaccess file using the instructions at
>>>>>
>>>>> http://httpd.apache.org/docs/1.3/howto/auth.html
>>>>>
>>>>> I also created the password file using htpasswd. This HOWTO seems to
>>>>> say
>>>>> that if I place the .htaccess file in this directory it will prompt me
>>>>> for a
>>>>> password. It also appears to be saying that I don't need to edit the
>>>>> httpd.conf file nor restart Apache.
>>>>>
>>>>> So I access this folder from one of the machines on the LAN and poof,
>>>>> I'm
>>>>> in. No password prompt appears at all.
>>>>>
>>>>> Can someone tell me what I did wrong?
>>>>
>>>> Do you have the AllowOverride setting in the httpd.conf?
>>>>
>>>
>>> My httpd.conf file has this line in it:'
>>>
>>> AllowOverride None
>>>
>>> Is this what you mean? Should I change it to AlllowOverride All or
>>> something.
>>
>> Yep. This means .htaccess-files aren't allowed. See
>> http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride for
>> possible values; and pick the one you prefer.
>>
>> --
>> Cheers,
>> Wietse
>
> Thanks for your help.. I really hate to be a pain but this is just not
> working. Let me see if I explain it very carefully because something is
> just not working. Remember I'm running 1.3
>
> 1. I executed the command htpasswd -c /path/to/passwdfile fred
> 2. I entered and confirmed the password for user fred
> 3. I then created an .htaccess file in the folder I want to protect
> AuthType Basic
> AuthName "By Invitation Only"
> AuthUserFile /path_to/passwd_file
> Require user fred
> 4. I edited the httpd.conf file
>
> Options FollowSymLinks
> AllowOverride All
>
> 5. I then restarted Apache
>
> The folder is still wide open. No password prompt appears. I cleared the
> cache in the browser but got the same thing.
>
> I even tried to lock down the actual folder in httpd.conf like this
>
> AllowOverride All
> AuthType Basic
> AuthName "By Invitation Only"
> AuthUserFile /home/frank/incoming/misc/appass
> Require user fred
>
>
> This at least asked for a password but then refused entry even though I
> was using the correct password and username.
>
> Any advice would be helpful.
>
>
> 5. I
>
>
Don't know what I did differently this time but it's working now....I did
set AllowOverride all in the section. That
seems to have done the trick.
Thanks again.