FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-23-2008, 05:54 AM
"Lóránd Erik"
 
Default .htaccess?

Why doesn't .htaccess rules work, when i example write this in it:

AuthUserFile /home/username/.htpasswd
AuthGroupFile /dev/null
AuthName "Private Area"
AuthType Basic
<Limit GET POST>

require valid-user
</Limit>

i just want to secure a folder by password, on apache2 [i just installed it, it works, but i can still see the folder, and it doesn't ask for password, i have .htpasswd in username/.htpasswd]


what am i missing?

thank you:S
 
Old 07-23-2008, 07:35 AM
Bob Cox
 
Default .htaccess?

On Wed, Jul 23, 2008 at 07:54:59 +0200, Lóránd Erik (lammmer80@gmail.com) wrote:

> Why doesn't .htaccess rules work, when i example write this in it:
>
> AuthUserFile /home/username/.htpasswd
> AuthGroupFile /dev/null
> AuthName "Private Area"
> AuthType Basic
> <Limit GET POST>
> require valid-user
> </Limit>
>
> i just want to secure a folder by password, on apache2 [i just installed it,
> it works, but i can still see the folder, and it doesn't ask for password, i
> have .htpasswd in username/.htpasswd]
>
> what am i missing?

Try it without the "<Limit GET POST>" etc.

All you should need is:

AuthUserFile /home/username/.htpasswd
AuthName "Private Area"
AuthType Basic
require valid-user

Please let us know if that helps.

--
Bob Cox. Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-23-2008, 12:52 PM
"Patrick Wiseman"
 
Default .htaccess?

On Wed, Jul 23, 2008 at 1:54 AM, Lóránd Erik <lammmer80@gmail.com> wrote:
> Why doesn't .htaccess rules work, when i example write this in it:
>
> AuthUserFile /home/username/.htpasswd
> AuthGroupFile /dev/null
> AuthName "Private Area"
> AuthType Basic
> <Limit GET POST>
> require valid-user
> </Limit>
>
> i just want to secure a folder by password, on apache2 [i just installed it,
> it works, but i can still see the folder, and it doesn't ask for password, i
> have .htpasswd in username/.htpasswd]
>
> what am i missing?

A lot. There's more to password protection in Apache than simply
dropping a .htaccess file in a directory. This is way, way OT, btw,
but what you almost certainly need to do is to AllowOverrideAll for
your directory before Apache will allow it to have control over
access. It's all in the documentation.

Patrick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-23-2008, 05:20 PM
"Lóránd Erik"
 
Default .htaccess?

It's working!!)
the httpd.conf file is empty, but the /etc/apache2/sites-available/default file had many-many configuration in it, i modified the:

<Directory /var/www/>

AllowOverrie All

.
.
.
</Directory>

and it works!!

thank you!!

2008/7/23 Bob Cox <debian-user@lists.bobcox.com>:

On Wed, Jul 23, 2008 at 07:54:59 +0200, Lóránd Erik (lammmer80@gmail.com) wrote:




> Why doesn't .htaccess rules work, when i example write this in it:

>

> AuthUserFile /home/username/.htpasswd

> AuthGroupFile /dev/null

> AuthName "Private Area"

> AuthType Basic

> <Limit GET POST>

> require valid-user

> </Limit>

>

> i just want to secure a folder by password, on apache2 [i just installed it,

> it works, but i can still see the folder, and it doesn't ask for password, i

> have .htpasswd in username/.htpasswd]

>

> what am i missing?



Try it without the "<Limit GET POST>" etc.



All you should need is:



AuthUserFile /home/username/.htpasswd

AuthName "Private Area"

AuthType Basic

require valid-user



Please let us know if that helps.



--

Bob Cox. *Stoke Gifford, near Bristol, UK.

Registered user #445000 with the Linux Counter - http://counter.li.org/





--

To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org

with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 10:13 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org