Project

General

Profile

Actions

Feature #430

closed

mod_auth doesn't support virtual hosts

Added by Anonymous almost 19 years ago. Updated about 16 years ago.

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

Description

I have a lighttpd installation supporting multiple hosts. I need to require authorization on the root of one of these hosts, but not the others. The mod_auth plugin, however, does not allow you to specify which host the auth requirement should apply to.

I have written a patch that allows you to specify an "authority"=>"myhost.org" name-value-pair in the auth.require array. if no "authority" is specified, the behavior is the same as it was before the patch. if "authority" is specified, then the auth.require entry only applies to the named host. I have also added a flag "use_physical"=>"yes" that causes the auth.require key to refer to a file system path rather than a URI path. If "use_physical" is enabled, then the physical location of the page requested is calculated (following symlinks and all) and compared to the key for the auth.require section to determine if the auth requirement applies to the incoming request.

I can't find any way to submit patches on this site, so let me know if you are interested in receiving the patch. I'll check back on this ticket for any replies.


Files

auth.patch (5.29 KB) auth.patch Anonymous, 2005-12-31 18:11
auth-fixed.patch (7 KB) auth-fixed.patch Fixed version of the first patch Anonymous, 2006-01-04 23:41
Actions #1

Updated by Anonymous almost 19 years ago

Fixed an error in the first patch

-- Ryan Owen

Actions #2

Updated by Anonymous almost 19 years ago

  • Status changed from New to Assigned

Why not use conditionals ?

$HTTPhost == "www.example.org" {
auth.require = ( ... )
}

The match against a physical path is reasonable.

-- jan

Actions #3

Updated by stbuehler over 16 years ago

  • Status changed from Assigned to Fixed
  • Resolution set to wontfix

That is what conditionals are for.

Actions #4

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Wontfix
Actions

Also available in: Atom