You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by LuKreme <kr...@kreme.com> on 2009/11/16 02:03:46 UTC

[users@httpd] Re: Apache error if using Basic AuthType under Location directive

On 15-Nov-2009, at 12:22, Eric Covener wrote:
> On Sun, Nov 15, 2009 at 11:42 AM, Iacopo Benesperi <ia...@iacchi.org> wrote:
>> Eric Covener ha scritto:
>>> As the error message says, You can't put <location> in htaccess.  It's
>>> got nothing to do with what's inside the <location>.
>> 
>> So where can I use the location directive?
> 
> Inside the configuration file read by Apache at startup (nominally
> httpd.conf, but may be a series of files in your installation)

Inside ANY of the configuration files, to be clear. Users generally have a specific conf file in /etc/httpd/user/user.conf and this is what you would need to put a <Location> in.

To do hat you want though, the simplest solution is to put a htaccess file in the folder you want to protect.


-- 
"It's like those French have a different word for *everything*" -
	Steve Martin


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache error if using Basic AuthType under Location directive

Posted by Iacopo Benesperi <ia...@iacchi.org>.
Krist van Besien ha scritto:
> So technically the OP could just dump the following .htaccess file in
> the top WebSVN directory:
> 
> AuthType Basic
> AuthName "Repository svn"
> AuthUserFile /home/liberenote/svn/materiale.passwd
> Require valid-user

You're right, but I want to access several repos with the same WebSVN
installation, so I need a different [repo].passwd for each repo; this is
why I was triing the location section in the first instance. Waiting for
a solution (if there's one) I've put a .htpasswd in the WebSVN root
folder which contain a merge of all repos .passwd, but in this way every
user can open every repo, and I don't want that if possible.

bye,
Iacopo

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache error if using Basic AuthType under Location directive

Posted by Krist van Besien <kr...@gmail.com>.
On Mon, Nov 16, 2009 at 10:53 AM, André Warnier <aw...@ice-sa.com> wrote:
> LuKreme wrote:
> ...
>
>>
>> To do hat you want though, the simplest solution is to put a htaccess file
>> in the folder you want to protect.
>>
> No, it is not, because in the OP's case there is not really a directory to
> protect and to put a .htacess file inside of.
> It is a URL that needs protecting, so it has to be done via a <Location>
> section.
> Unfortunately, if the Ophas no access to the Apache configuration files,
> then he has a problem.

WebSVN is a set of PHP scripts, that you install somewhere on your filesystem.

So technically the OP could just dump the following .htaccess file in
the top WebSVN directory:

AuthType Basic
AuthName "Repository svn"
AuthUserFile /home/liberenote/svn/materiale.passwd
Require valid-user

Krist




-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache error if using Basic AuthType under Location directive

Posted by André Warnier <aw...@ice-sa.com>.
LuKreme wrote:
...

> 
> To do hat you want though, the simplest solution is to put a htaccess file in the folder you want to protect.
> 
No, it is not, because in the OP's case there is not really a directory 
to protect and to put a .htacess file inside of.
It is a URL that needs protecting, so it has to be done via a <Location> 
section.
Unfortunately, if the Ophas no access to the Apache configuration files, 
then he has a problem.


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org