NAME

HTTPConfig - A httpd configured dispatcher

SYNOPSIS

This example module shows how to take advantage of the httpd configuration to configure your dispatcher.

# -- httpd.conf
MogReproxyToken old_web
MogDomain localhost
<MogTrackers>
  mog1 192.168.100.3:1325
  mog2 192.168.100.4:1325
</MogTrackers>

<LocationMatch "^/">
    SetHandler modperl
    PerlHandler HTTPConfig
</LocationMatch>

CONFIGURATION

MogReproxyToken

If a reproxy token is set and a given uri/file is not to be handled through mogile then it will issue a 'X-REPROXY-SERVICE' => TOKEN_XYZ instead of reproxying the url through one of the static servers.

Note that when this option is set the static servers directive is completely ignored.

MogDomain

This option is passed on to mogile object creation.

MogTrackers

The MogTrackers directive sets the MogileFS trackers to query.

<MogTrackers>
  mog1 192.168.100.3:1325
  mog2 192.168.100.4:1325
  mog3 localhost:1325
  mog4 localhost:1326
  ...
</MogTrackers>

Note that the first column indicating node names really doesn't mean or do anything.

MogStaticServers

Much like MogTrackers and MogMemcaches, this option sets the static servers to reproxy to if a given file/uri is not handled by mogile. Note that this is completely useless if mogile handles everything, via setting MogAlways to 'mogile'.

<MogStaticServers>
  web1 http://192.168.100.3:80
  web2 http://192.168.100.4:80
  web3 http://localhost:80
  ...
</MogStaticServers>

If Apache2::Mogile::Dispatch handles the uri '/socklabs/index.html' and the director says that it is not infact to be handled by mogile, it will attempt to content the static servers to request the file. In this case it starts at the top and works its way through the list using the first one that returns 200 - OK. If none of them return then a 404 - Not Found is returned.

Note that the format for the reproxy is very simple:

<static server x><uri>

AUTHOR

Nick Gerakines, <nick at socklabs.com>

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Apache2::Mogile::Dispatch

COPYRIGHT & LICENSE

Copyright 2006 Nick Gerakines, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.