Apache2-Mogile-Dispatch

 view release on metacpan or  search on metacpan

doc/examples/HTTPConfig.pm  view on Meta::CPAN

  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>

=head1 CONFIGURATION

=head2 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.

=head2 MogDomain

This option is passed on to mogile object creation.

=head2 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.

=head2 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>

=head1 AUTHOR

Nick Gerakines, C<< <nick at socklabs.com> >>

=head1 SUPPORT

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

  perldoc Apache2::Mogile::Dispatch

=head1 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.

=cut



( run in 1.155 second using v1.01-cache-2.11-cpan-39bf76dae61 )