You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eric Brown <er...@gmail.com> on 2005/06/01 19:54:24 UTC
[users@httpd] problem with require directive
Hello-
Trying to setup basic authentication.
Using the following in my httpd.conf file:
<Location /svn>
#how to authenticate a user
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/site-passwd
#Only authenticated users may have access
Require valid-user brownec
</Location>
Here are the modules I have:
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule dav_svn_module modules/mod_dav_svn.so=20
The authentication window pops up OK, but I can't get in, and I get
the following lines
in my error log:
error: unknown require directive valid-user
error: user brownec does not have access
- valid-user is a valid directive, and I have the right module to use it.
- my name is entered in the /etc/site-passwd file (used the htpasswd comman=
d)
Still getting the same error after a few server restarts. Can't seem
to get around this one.
Any help would be appreciated.
Thanks.
---------------------------------------------------------------------
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] problem with require directive
Posted by Joshua Slive <js...@gmail.com>.
On 6/2/05, Eric Brown <er...@gmail.com> wrote:
> 2. I'd like /svn to be read off of my document root /path/to/docroot.
> <Location /svn>
> </Location>
> Which I understood to mean that when I brought up my
> page(www.mysite.com), it would display my doc root,
> /absolute/path/to/docroot, and would use whatever options I place
> inside of the tags. Correct?
I don't understand that question at all.
Joshua.
---------------------------------------------------------------------
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] problem with require directive
Posted by Eric Brown <er...@gmail.com>.
My mistake.
<Directory /path/to/svn>
1.I tried it again without my user name and using the directory tag.
working well. Thank you.
2. I'd like /svn to be read off of my document root /path/to/docroot.
<Location /svn>
</Location>
Which I understood to mean that when I brought up my
page(www.mysite.com), it would display my doc root,
/absolute/path/to/docroot, and would use whatever options I place
inside of the tags. Correct?
On 6/2/05, Joshua Slive <js...@gmail.com> wrote:
> On 6/2/05, Eric Brown <er...@gmail.com> wrote:
> > Here's what worked: I put all of the Auth directives in a Directory tag
> >
> > <Directory /svn>
> > #how to authenticate a user
> > AuthType Basic
> > AuthName "Restricted Files"
> > AuthUserFile /etc/site-passwd
> > #Only authenticated users may have access
> > Require valid-user brownec
> > </Directory>
>
> This is just not correct. As I said "Require valid-user brownec"
> doesn't make any sense. Plus, <Directory /svn> looks for the svn
> directory off the root of your filesystem (not under the
> DocumentRoot). Is that really what you want?
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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] problem with require directive
Posted by Joshua Slive <js...@gmail.com>.
On 6/2/05, Eric Brown <er...@gmail.com> wrote:
> Here's what worked: I put all of the Auth directives in a Directory tag
>
> <Directory /svn>
> #how to authenticate a user
> AuthType Basic
> AuthName "Restricted Files"
> AuthUserFile /etc/site-passwd
> #Only authenticated users may have access
> Require valid-user brownec
> </Directory>
This is just not correct. As I said "Require valid-user brownec"
doesn't make any sense. Plus, <Directory /svn> looks for the svn
directory off the root of your filesystem (not under the
DocumentRoot). Is that really what you want?
Joshua.
---------------------------------------------------------------------
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] problem with require directive
Posted by Eric Brown <er...@gmail.com>.
Here's what worked: I put all of the Auth directives in a Directory tag
<Directory /svn>
#how to authenticate a user
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/site-passwd
#Only authenticated users may have access
Require valid-user brownec
</Directory>
I could only get the site to authenticate when I had my name listed in
the valid-user line.
Otherwise, I get "unknown require directive" messages in my error log.
I was under the impression that apache looked in the location block
before the directory block.
Thanks.
---------------------------------------------------------------------
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] problem with require directive
Posted by Joshua Slive <js...@gmail.com>.
On 6/1/05, Eric Brown <er...@gmail.com> wrote:
> Require valid-user brownec
Hmmm... That doesn't make sense. You want either:
# Let any user in
Require valid-user
# or let in only brownec
Require user brownec
Joshua.
---------------------------------------------------------------------
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