Application Agents on backend servers

From RavenWiki
Revision as of 15:57, 1 December 2006 by jw35 (talk | contribs) (Credit where credit's due)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Sometimes you want to run an application agent like mod_ucam_webauth on a backend webserver that shelters behind some sort of front-end (which might be a load balancer or an Apache reverse proxy, or something). Left to itself, if the backend generates a 'self-referential' URL (as Raven application agents need to do) it will by default point at the backend server but you probably want it to point at the front-end. The combination of ServerName, UseCanonicalName and the use of the client's HTTP Host header allows an Apache administrator full control over the hostname and port number part of the generated URLs, but the scheme is up to Apache itself.

The mod_urlscheme Apache module can be useful here - it allows the Apache configuration author control over the scheme to use when constructing self-referential URLs.

(Thanks to Ben Langridge for pointing out this module)

There's actually a patch for mod_ucam_webauth (see this mail thread) that would cope with this and other similar issues, but it's yet to be incorporated into the module as distributed.