You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Werner Schalk <we...@gmx.de> on 2002/08/01 12:04:08 UTC

RewriteMap

Hello,

I'm trying to use RewriteMap together
with RewriteRule and my httpd.conf
looks like this:

RewriteEngine On
RewriteMap user-dir txt:/usr/local/apache2/conf/userdir.txt
RewriteRule ^/~(.*) ${user-dir:$2}
RewriteLog /usr/local/apache2/logs/rewrite.log
RewriteLogLevel 2

/usr/local/apache2/conf/userdir.txt looks like this:
joe.average	/joe

So when I access http://localhost/~joe.average/
I get an error that the site could not be displayed.
In the logfile of mod_rewrite he does not seem
to open the userdir.txt file:
192.168.0.4 - - [25/Dec/2002:12:05:25 +0100]
[192.168.0.1/sid#80b8e10][rid#8146240/initial] (2) rewrite
/~joe.average/ ->
192.168.0.4 - - [25/Dec/2002:12:05:25 +0100]
[192.168.0.1/sid#80b8e10][rid#8146240/initial] (2) local path result:
192.168.0.4 - - [25/Dec/2002:12:05:25 +0100]
[192.168.0.1/sid#80b8e10][rid#8147550/initial/redir#1] (2) init rewrite
engine with requested uri /error/HTTP_BAD_REQUEST.html.var

Could somebody help me out of this?
The docs are very unclear at this point
I think!

Thanks and bye,
Werner


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Authentication using AuthUserFile

Posted by Robert Andersson <ro...@profundis.nu>.
Hi, glad it works.

Delete users by deleting the row manually. If you can, use an editor that
preserve newlines, Notepad should do it.

You use groups like before (require group <group_name>),  and create a file
like the one you had by hand (there is no tool for that):
<group_name>: <username> ...

Good luck.

Regards,
Robert Andersson.

----- Original Message -----
From: "kirti jambula" <kj...@indusrad.com>
To: <us...@httpd.apache.org>
Cc: <ab...@indusrad.com>; <cl...@indusrad.com>
Sent: Friday, August 02, 2002 9:16 AM
Subject: RE: Authentication using AuthUserFile


> Thanks a lot for the reply, I tried using the htpasswd command and created
> the users and password and its working perfectly.But I am not able to
delete
> a user once I add them. And how do I use the groups here.
>
> Regards,
> Kirti
>
> -----Original Message-----
> From: Robert Andersson [mailto:robert@profundis.nu]
> Sent: Friday, August 02, 2002 11:20 AM
> To: users@httpd.apache.org; kjambula@indusrad.com
> Subject: Re: Authentication using AuthUserFile
>
>
> I can't tell what's wrong; it looks like a valid user file with plain
> plassword. What version of Apache are you using?
>
> I did see a few other issues with you configuration.
>
> > <Directory "D:/Program Files/Apache Group/Apache/htdocs/Test">
> > Options Indexes FollowSymLinks
> > AllowOverride None
> > order allow,deny
> > allow from all
>
> You have "Order allow,deny", and define "Allow from all", but no "Deny".
Are
> you sure about this? Otherwise, go read that part of the docs:
> http://httpd.apache.org/docs-2.0/mod/mod_access.html
> Note sure, but I don't think you have any use or Order in this directory.
>
> > AuthName "Enter UserName and Password to Login to PIMS"
> > AuthType Basic
> > AuthUserFile htdocs/Test/web/users/users.txt
> > AuthGroupFile htdocs/Test/web/groups/groups.txt
>
> I think you should try to use the absolute path to the user/group files,
> within double quotes. Perhaps easier to put them in the root while getting
> it to work...
>
> > <Limit GET POST>
> > require group admin
> > </Limit>
>
> Remove the <Limit ...> and </Limit> tags as you don't really want them and
> is bad style. Then, also try "require valid-user" and "require user kirti"
> to see if that gives something.
>
> You had written the user file yourself? Are you sure that you don't got
some
> illegal newlines or similar. I suggest you try to create a new file using
> htpasswd. You do this by simply open up a command prompt, cd to Apache's
bin
> directory and type:
> ...apache\bin> htpasswd -cpb <quoted_path_to_user_file> <username>
> <password>
> This creates a new file with only that user, using plaintext password. If
> you want to add another user, you remove the 'c' in the options (and
change
> the username/password, of course).
>
>
> Regards,
> Robert Andersson
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Authentication using AuthUserFile

Posted by kirti jambula <kj...@indusrad.com>.
Thanks a lot for the reply, I tried using the htpasswd command and created
the users and password and its working perfectly.But I am not able to delete
a user once I add them. And how do I use the groups here.

Regards,
Kirti

-----Original Message-----
From: Robert Andersson [mailto:robert@profundis.nu]
Sent: Friday, August 02, 2002 11:20 AM
To: users@httpd.apache.org; kjambula@indusrad.com
Subject: Re: Authentication using AuthUserFile


I can't tell what's wrong; it looks like a valid user file with plain
plassword. What version of Apache are you using?

I did see a few other issues with you configuration.

> <Directory "D:/Program Files/Apache Group/Apache/htdocs/Test">
> Options Indexes FollowSymLinks
> AllowOverride None
> order allow,deny
> allow from all

You have "Order allow,deny", and define "Allow from all", but no "Deny". Are
you sure about this? Otherwise, go read that part of the docs:
http://httpd.apache.org/docs-2.0/mod/mod_access.html
Note sure, but I don't think you have any use or Order in this directory.

> AuthName "Enter UserName and Password to Login to PIMS"
> AuthType Basic
> AuthUserFile htdocs/Test/web/users/users.txt
> AuthGroupFile htdocs/Test/web/groups/groups.txt

I think you should try to use the absolute path to the user/group files,
within double quotes. Perhaps easier to put them in the root while getting
it to work...

> <Limit GET POST>
> require group admin
> </Limit>

Remove the <Limit ...> and </Limit> tags as you don't really want them and
is bad style. Then, also try "require valid-user" and "require user kirti"
to see if that gives something.

You had written the user file yourself? Are you sure that you don't got some
illegal newlines or similar. I suggest you try to create a new file using
htpasswd. You do this by simply open up a command prompt, cd to Apache's bin
directory and type:
...apache\bin> htpasswd -cpb <quoted_path_to_user_file> <username>
<password>
This creates a new file with only that user, using plaintext password. If
you want to add another user, you remove the 'c' in the options (and change
the username/password, of course).


Regards,
Robert Andersson





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Authentication using AuthUserFile

Posted by Robert Andersson <ro...@profundis.nu>.
I can't tell what's wrong; it looks like a valid user file with plain
plassword. What version of Apache are you using?

I did see a few other issues with you configuration.

> <Directory "D:/Program Files/Apache Group/Apache/htdocs/Test">
> Options Indexes FollowSymLinks
> AllowOverride None
> order allow,deny
> allow from all

You have "Order allow,deny", and define "Allow from all", but no "Deny". Are
you sure about this? Otherwise, go read that part of the docs:
http://httpd.apache.org/docs-2.0/mod/mod_access.html
Note sure, but I don't think you have any use or Order in this directory.

> AuthName "Enter UserName and Password to Login to PIMS"
> AuthType Basic
> AuthUserFile htdocs/Test/web/users/users.txt
> AuthGroupFile htdocs/Test/web/groups/groups.txt

I think you should try to use the absolute path to the user/group files,
within double quotes. Perhaps easier to put them in the root while getting
it to work...

> <Limit GET POST>
> require group admin
> </Limit>

Remove the <Limit ...> and </Limit> tags as you don't really want them and
is bad style. Then, also try "require valid-user" and "require user kirti"
to see if that gives something.

You had written the user file yourself? Are you sure that you don't got some
illegal newlines or similar. I suggest you try to create a new file using
htpasswd. You do this by simply open up a command prompt, cd to Apache's bin
directory and type:
...apache\bin> htpasswd -cpb <quoted_path_to_user_file> <username>
<password>
This creates a new file with only that user, using plaintext password. If
you want to add another user, you remove the 'c' in the options (and change
the username/password, of course).


Regards,
Robert Andersson


----- Original Message -----
From: "kirti jambula" <kj...@indusrad.com>
To: <us...@httpd.apache.org>
Cc: <cl...@indusrad.com>; <ab...@indusrad.com>
Sent: Thursday, August 01, 2002 4:52 PM
Subject: RE: Authentication using AuthUserFile


> I have tried it, i changed it to this:
>
> kirti:kirti
> saritha:saritha
> neelima:neelima
>
> My groups.txt contains :
>
> admin: kirti saritha
>
> The error log is showing the same message:
>
> [Thu Aug 01 20:18:17 2002] [error] [client 192.168.0.177] user kirti:
> authentication failure for "/Test": crypt() unavailable on Win32, cannot
> validate password
>
> What do u think is the problem?
>
> Regards,
> Kirti
>
>
> -----Original Message-----
> From: Robert Andersson [mailto:robert@profundis.nu]
> Sent: Thursday, August 01, 2002 6:52 PM
> To: users@httpd.apache.org; kjambula@indusrad.com
> Subject: Re: Authentication using AuthUserFile
>
>
> Try without the space after the colon in the user file, eg: "kirti:kirti".
A
> password cannot contain a space, so it will interpret it as an ecrypted by
> some algorithm not available on Win32.
>
> Regards,
> Robert Andersson
>
> ----- Original Message -----
> From: "kirti jambula" <kj...@indusrad.com>
> To: <us...@httpd.apache.org>
> Cc: <cl...@indusrad.com>; <ab...@indusrad.com>
> Sent: Thursday, August 01, 2002 2:47 PM
> Subject: Authentication using AuthUserFile
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Authentication using AuthUserFile

Posted by kirti jambula <kj...@indusrad.com>.
I have tried it, i changed it to this:

kirti:kirti
saritha:saritha
neelima:neelima

My groups.txt contains :

admin: kirti saritha

The error log is showing the same message:

[Thu Aug 01 20:18:17 2002] [error] [client 192.168.0.177] user kirti:
authentication failure for "/Test": crypt() unavailable on Win32, cannot
validate password

What do u think is the problem?

Regards,
Kirti


-----Original Message-----
From: Robert Andersson [mailto:robert@profundis.nu]
Sent: Thursday, August 01, 2002 6:52 PM
To: users@httpd.apache.org; kjambula@indusrad.com
Subject: Re: Authentication using AuthUserFile


Try without the space after the colon in the user file, eg: "kirti:kirti". A
password cannot contain a space, so it will interpret it as an ecrypted by
some algorithm not available on Win32.

Regards,
Robert Andersson

----- Original Message -----
From: "kirti jambula" <kj...@indusrad.com>
To: <us...@httpd.apache.org>
Cc: <cl...@indusrad.com>; <ab...@indusrad.com>
Sent: Thursday, August 01, 2002 2:47 PM
Subject: Authentication using AuthUserFile





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Authentication using AuthUserFile

Posted by Robert Andersson <ro...@profundis.nu>.
Try without the space after the colon in the user file, eg: "kirti:kirti". A
password cannot contain a space, so it will interpret it as an ecrypted by
some algorithm not available on Win32.

Regards,
Robert Andersson

----- Original Message -----
From: "kirti jambula" <kj...@indusrad.com>
To: <us...@httpd.apache.org>
Cc: <cl...@indusrad.com>; <ab...@indusrad.com>
Sent: Thursday, August 01, 2002 2:47 PM
Subject: Authentication using AuthUserFile


> Hi,
>         I am trying to authenticate using the following lines in my
> http.conf file:
>
>
>
###########################################################################
> <Directory "D:/Program Files/Apache Group/Apache/htdocs/Test">
> Options Indexes FollowSymLinks
> AllowOverride None
> order allow,deny
> allow from all
> AuthName "Enter UserName and Password to Login to PIMS"
> AuthType Basic
> AuthUserFile htdocs/Test/web/users/users.txt
> AuthGroupFile htdocs/Test/web/groups/groups.txt
> <Limit GET POST>
> require group admin
> </Limit>
>
> </Directory>
> ########################################################################
>
> My users.txt contains:
>
> kirti: kirti
> saritha: saritha
> neelima: neelima
>
>         When  I run the application in my Internet explorer I am getting
the
> following error message in my error.log file:
>
>         [Thu Aug 01 18:15:11 2002] [error] [client 192.168.0.177] user
> kirti: authentication failure for "/Test": crypt() unavailable on Win32,
> cannot validate password
>
> Can u please tell me what additional software I need to load in Win2000 to
> run my application.
> I am working on Win2000.
>
> Regards,
> Kirti
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Authentication using AuthUserFile

Posted by kirti jambula <kj...@indusrad.com>.
Hi,
        I am trying to authenticate using the following lines in my
http.conf file:


###########################################################################
<Directory "D:/Program Files/Apache Group/Apache/htdocs/Test">
Options Indexes FollowSymLinks
AllowOverride None
order allow,deny
allow from all
AuthName "Enter UserName and Password to Login to PIMS"
AuthType Basic
AuthUserFile htdocs/Test/web/users/users.txt
AuthGroupFile htdocs/Test/web/groups/groups.txt
<Limit GET POST>
require group admin
</Limit>

</Directory>
########################################################################

My users.txt contains:

kirti: kirti
saritha: saritha
neelima: neelima

        When  I run the application in my Internet explorer I am getting the
following error message in my error.log file:

        [Thu Aug 01 18:15:11 2002] [error] [client 192.168.0.177] user
kirti: authentication failure for "/Test": crypt() unavailable on Win32,
cannot validate password

Can u please tell me what additional software I need to load in Win2000 to
run my application.
I am working on Win2000.

Regards,
Kirti



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org