Any-Daemon-HTTP
view release on metacpan or search on metacpan
version 0.25: Tue Apr 15 08:49:00 CEST 2014
Fixes:
- deadline passed log showed '0' seconds passed
- changes in LogReport [cpantesters]
Improvements:
- changed documentation style
- wait upto 30 seconds when the socket is still in use.
version 0.24: Sun Jan 5 17:38:19 CET 2014
Changes:
- removed ::HTTP::new(use_ssl), now detected from portnumber
- move to Log::Report 1.00
- use IO::Socket::IP, to support IPv6
Fixes:
- no warning when request does not have Host
- show destination and owner of symlinks
- vhost not finding directory.
lib/Any/Daemon/HTTP.pod view on Meta::CPAN
=item pid_file => FILENAME
=item protocol => 'HTTP'|'HTTPS'|'FCGI'
[0.29] Specify which kind of connection has to be managed: plain HTTP,
HTTP over SSL, or HTTP over FCGI.
=item proxies => PROXY|PACKAGE|\%options|ARRAY
[0.24] For %options, see L<addProxy()|Any::Daemon::HTTP/"Host administration">.
The %options are passed to L<addProxy()|Any::Daemon::HTTP/"Host administration">, to create a proxy
object under fly. You may also pass an L<Any::Daemon::HTTP::Proxy|Any::Daemon::HTTP::Proxy>
objects or by the %options to create such objects. An ARRAY contains a
mixture of proxy definitions. Same as option C<proxy>.
=item proxy_class => PACKAGE
[0.24] The PACKAGE must extend the default class.
=item server_id => STRING
=item session_class => PACKAGE
[0.21] The PACKAGE must extend the default class. The extended class may
be used to implement loading and saving session information, or adding
abstraction.
=item show_in_ps => BOOLEAN
lib/Any/Daemon/HTTP.pod view on Meta::CPAN
[0.22] The PACKAGE must extend the default class. See the
L<Any::Daemon::HTTP::VirtualHost/DETAILS> about creating your own virtual
hosts.
=item vhosts => VHOST|PACKAGE|\%options|ARRAY
The %options are passed to L<addVirtualHost()|Any::Daemon::HTTP/"Host administration">, to create a virtual host
object under fly. You may also pass an initialized
L<Any::Daemon::HTTP::VirtualHost|Any::Daemon::HTTP::VirtualHost> object, or a PACKAGE name to be used
for the default vhost. An ARRAY contains a mixture of vhost definitions.
[0.24] Same as option C<vhost>.
=item workdir => DIRECTORY
=back
=back
=head2 Accessors
Extends L<"Accessors" in Any::Daemon|Any::Daemon/"Accessors">.
lib/Any/Daemon/HTTP.pod view on Meta::CPAN
# Implicitly add virtual hosts
push @vhosts, $vhost;
my $http = Any::Daemon::HTTP->new
( ...
, vhosts => \@vhosts
);
=item $obj-E<gt>B<findProxy>($session, $request, $host)
[0.24] Find the first proxy which is mapping the URI of the $request. Returns a
pair, containing the proxy and the location where it points to.
Usually, in a proxy, the request needs to be in absolute form in the
request header. However, we can be more
=item $obj-E<gt>B<proxies>()
[0.24] Returns a list with all added proxy objects.
=item $obj-E<gt>B<removeVirtualHost>($vhost|$name|$alias)
Remove all name and alias registrations for the indicated virtual host.
Silently ignores non-existing vhosts. The removed virtual host object
is returned.
=item $obj-E<gt>B<virtualHost>($name)
Find the virtual host with the $name or alias. Returns the
lib/Any/Daemon/HTTP.pod view on Meta::CPAN
have small files) will help protecting your server.
This setting determines the minimum time for a save server reboot. When
the daemon is stopped, the client may still keeps its socket. The restart
of the server may fail with "socket already in use".
=item max_childs => INTEGER
=item max_conn_per_child => INTEGER
[0.24] Average maximum number of connections which are handled
per process, before it commits suicide to cleanup garbaged memory.
The parent will start a new process.
This value gets a random value in 10% range added to subtracted to avoid
that all childs reset at the same time. So, for the default value, 9_000
upto 11_000 connections will be served before a reset.
=item max_req_per_child => INTEGER
[0.24] maximum number of HTTP requests accepted by all connections for
one process.
=item max_req_per_conn => INTEGER
[0.24] maximum number of HTTP requests handled in one connection.
=item max_time_per_conn => SECONDS
Maximum time a connection will stay alive. When the time expires, the
process will forcefully killed. For each request, C<req_time_bonus>
seconds are added. This may be a bit short when your files are large.
=item new_child => CODE|METHOD
[0.28] run code when a new child process is started. This will run
lib/Any/Daemon/HTTP/Proxy.pod view on Meta::CPAN
is an Any::Daemon::HTTP::Source
=head1 SYNOPSIS
my $proxy = Any::Daemon::HTTP::Proxy->new(path => '/forward');
my $vh = Any::Daemon::HTTP::VirtualHost->new(proxies => $proxy);
=head1 DESCRIPTION
[Available since v0.24] B<Warning: new code, not intensively tested.>
There are two kinds of proxies:
=over 4
=item 1.
Each L<Any::Daemon::HTTP::VirtualHost|Any::Daemon::HTTP::VirtualHost> may define as many proxies as it
needs: selected by location inside a virtual host namespace, just like other
directories. These requests are forwarded to some proxy server.
( run in 1.759 second using v1.01-cache-2.11-cpan-7add2cbd662 )