Project

General

Profile

Actions

Feature #1498

closed

REMOTE_USER?

Added by Anonymous almost 17 years ago. Updated almost 16 years ago.

Status:
Wontfix
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

As per http://trac.lighttpd.net/trac/wiki/Docs%3AConfiguration,

I see that you could configure where <field> as one of the following:

$HTTP["cookie"]
$HTTP["host"]
$HTTP["useragent"]
$HTTP["referer"]
$HTTP["url"]
$HTTP["querystring"]
$HTTP["remoteip"]

Is it possible to add a $HTTP["remoteuser"] whereas it refers to Apache's %{REMOTE_USER}?

Actions #1

Updated by stbuehler almost 17 years ago

Check the user with mod_auth: http://trac.lighttpd.net/trac/wiki/Docs%3AModAuth

Or explain why this is not thing you want ;-)

Actions #2

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to wontfix
Actions #3

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Wontfix
Actions #4

Updated by junksmi about 16 years ago

  • Status changed from Wontfix to Reopened

Hi, sorry to reopen this, but if you mean "require" => "user=agent007|user=agent008" when referring the wanted thing: I would like to use something like described here Mod_Rewrite : Redirect page based on authentication :

.... My main intention was to redirect users to their main page in their allocated directories. In my case when user tom log's in at www.mainsite.com he will be redirected /home/mainsite/tom/page.html.

RewriteEngine on
RewriteCond $1!^tom/
RewriteCond %{REMOTE_USER} ^tom$ [NC]
RewriteRule (.*) /home/mainsite/tom/$1 [L]
RewriteCond $1!^dick/
RewriteCond %{REMOTE_USER} ^dick$ [NC]
RewriteRule (.*) /home/mainsite/dick/$1 [L]
RewriteCond $1!^harry/
RewriteCond %{REMOTE_USER} ^harry$ [NC]
RewriteRule (.*) /home/mainsite/harry/$1 [L] 

I believe for something like that, the "remote_user" should be available as a "value" in the .conf somehow... would that be possible?

Actions #5

Updated by stbuehler about 16 years ago

  • Priority changed from High to Normal
  • Pending set to No
  • Patch available set to No

I think a mod_magnet script should be able to handle this; and i don't see why you are not just using the destination urls (that is i don't think we need this feature).

Actions #6

Updated by junksmi about 16 years ago

Hi, sorry to "reopen" this, just wanted to post a comment :)
As far as I can see from Docs:ModMagnet, username variable is not available (and besides, I'm running lighttpd from a router, and mod_magnet doesn't seem to be present).
Anyways, this is my use case of user- or authentication- based redirection:
  • I give all my users a single adress myserver.com
  • when they go there, they are asked to login
  • upon login, they are respectively redirected to their dirs (user1 to user1.myserver.com [or myserver.com/user1, doesn't matter])
  • If user1 finds out a domain of user2, and enters user2.myserver.com/... [or myserver.com/user2/...], user1 is again presented with a prompt; if proper user1 credentials are given, user1 is again redirected to user1.myserver.com [or myserver.com/user1]

I'm trying to do this with rewrite/redirect and php, but I'm constantly bumping into endless loops :) Besides, I wouldn't won't any parse.php?/user1/... to be seen in adress bar, and I'd like to use the default dir-lister of lighttpd - that's why I thought, the most likely level to solve something like this easily, would be on a level of server configuration..

Thanks !!

Actions #7

Updated by nitrox about 16 years ago

  • Target version changed from 1.4.20 to 1.4.21
Actions #8

Updated by junksmi about 16 years ago

junksmi wrote:

Hi, sorry to "reopen" this, just wanted to post a comment :)

Just to note: moved this topic of 'authentication based redirection' here:
http://redmine.lighttpd.net/boards/3/topics/show/527

Actions #9

Updated by stbuehler almost 16 years ago

  • Status changed from Reopened to Wontfix
Actions

Also available in: Atom