You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Carlos Costa Portela <cc...@servidores.net> on 2002/04/22 12:02:26 UTC

About .htaccess

	Hello all!

	I have the next problem: if I want to use .htaccess features, I
must not just put the .htaccess file in the directory I want to protect,
but in the <Directory ...> section of httpd.conf

	Is that normal of perhaps am I doing something wrong?

	Best regards,
		Carlos.

  http://www.tertulandia.com : sea cual sea tu tema... allí está tu sitio!

 _______Carlos Costa Portela_________________________________________________
| e-mail:  ccosta@servidores.net | home page: http://casa.ccp.servidores.net |
|_____Tódalas persoas maiores foron nenos antes, pero poucas se lembran______|


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: About .htaccess

Posted by Owen Boyle <ob...@bourse.ch>.
Carlos Costa Portela wrote:
> 
>         Ok. But is there any way to do that I can create my .htaccess
> without insert anything in httpd.conf?. I don't want insert a new
> <Directory ...> block for each time I want to protect a directory, or
> apply a new directive. Is there any way to achieve this?

Try setting AllowOverride All at server-config level (i.e. outside of
all <Directory> and <VirtualHost> blocks. However, this is actually the
default so it should work already - unless you switch it off somewhere
else... (I think if you have even one AllowOverride directive anywhere,
it switches off default behaviour everywhere).

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: About .htaccess

Posted by Carlos Costa Portela <cc...@servidores.net>.
On Mon, 22 Apr 2002, Owen Boyle wrote:
> Remember that .htaccess files are not essential for password protection:

	Certainly. Thanks!

> .htaccess is just a method of making certain directives apply to a
> particular directory (including those needed by mod_auth for password
> protection). To make .htaccess work you need to allow it to override the
> directives in httpd.conf - that usually means doing:
>
> <Directory /path/to/dir>
>   AllowOverride AuthConfig
> </Directory>

	Ok. But is there any way to do that I can create my .htaccess
without insert anything in httpd.conf?. I don't want insert a new
<Directory ...> block for each time I want to protect a directory, or
apply a new directive. Is there any way to achieve this?

	Thanks in advance,
		Carlos.

  http://www.tertulandia.com : sea cual sea tu tema... allí está tu sitio!

 _______Carlos Costa Portela_________________________________________________
| e-mail:  ccosta@servidores.net | home page: http://casa.ccp.servidores.net |
|_____Tódalas persoas maiores foron nenos antes, pero poucas se lembran______|


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: About .htaccess

Posted by Owen Boyle <ob...@bourse.ch>.
Carlos Costa Portela wrote:
> 
>         Hello all!
> 
>         I have the next problem: if I want to use .htaccess features, I
> must not just put the .htaccess file in the directory I want to protect,
> but in the <Directory ...> section of httpd.conf
> 
>         Is that normal of perhaps am I doing something wrong?

Remember that .htaccess files are not essential for password protection:

.htaccess is just a method of making certain directives apply to a
particular directory (including those needed by mod_auth for password
protection). To make .htaccess work you need to allow it to override the
directives in httpd.conf - that usually means doing:

<Directory /path/to/dir>
  AllowOverride AuthConfig
</Directory> 

but read the docs for AllowOverride to see what else it can do...

Note that you can also make a directory password protected by putting
the mod_auth directives directly into a Directory container in htpd.conf
and never using .htaccess (that is what you do now, I think).

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org