The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

capo.fcgi - (f)cgi script for Captive::Portal

ABSTRACT

(f)cgi script to handle http(s) requests for Captive::Portal.

DESCRIPTION

This script is started by the HTTP server. It can be used as a simple CGI script, but for heavy loaded sites FastCGI is strongly recommended.

CONFIGURATION

The Captive::Portal config file is searched in the following places:

    $ENV{CAPTIVE_PORTAL_CONFIG} ||
    $Bin/../etc/local/config.pl ||
    $Bin/../etc/config.pl

LOGGING

The Log::Log4perl config file is searched in the following places:

    $ENV{CAPTIVE_PORTAL_LOG4PERL}   ||
    $Bin/../etc/local/log4perl.conf ||
    $Bin/../etc/log4perl.conf

CLIENT API

https://capo.acme.org/capo

Return the splash-page with login form.

https://capo.acme.org/capo?login=username;password=secret

Login the user, return the active-page with logout form.

https://capo.acme.org/capo?logout=true

Logout the user, return the splash-page with login form.

ADMIN API

https://capo.acme.org/capo/status

Return the summary-status-page with admin-secret form.

https://capo.acme.org/capo/status?admin_secret=secret

Return the detail-status-page.

https://capo.acme.org/capo/status?admin_secret=secret;astext=true

Return the detail-status-page as text/plain.

https://capo.acme.org/capo/is_running

Return the number of active clients (ipset entries) as text/plain.

Example:

  RUNNING 1340 rules loaded

AUTHOR

Karl Gaissmaier, <gaissmai at cpan.org>

LICENSE AND COPYRIGHT

Copyright 2010-2012 Karl Gaissmaier, all rights reserved.

This distribution is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version, or

b) the Artistic License version 2.0.