📄 serverrec.pm
字号:
# # /*# * *********** WARNING **************# * This file generated by ModPerl::WrapXS/0.01# * Any changes made here will be lost# * ***********************************# * 01: lib/ModPerl/Code.pm:708# * 02: lib/ModPerl/WrapXS.pm:624# * 03: lib/ModPerl/WrapXS.pm:1173# * 04: Makefile.PL:423# * 05: Makefile.PL:325# * 06: Makefile.PL:56# */# package Apache2::ServerRec;use strict;use warnings FATAL => 'all';use Apache2::XSLoader ();our $VERSION = '2.000002';Apache2::XSLoader::load __PACKAGE__;use Exporter ();use Apache2::Log (); # Apache2::ServerRec::loads warn@Apache2::ServerRec::EXPORT_OK = qw(warn);*Apache2::ServerRec::import = \&Exporter::import;1;__END__=head1 NAMEApache2::ServerRec - Perl API for Apache server record accessors=head1 Synopsis use Apache2::ServerRec (); $error_fname = $s->error_fname(); $is_virtual = $s->is_virtual(); $keep_alive = $s->keep_alive(); $keep_alive_max = $s->keep_alive_max(); $keep_alive_timeout = $s->keep_alive_timeout(); $limit_req_fields = $s->limit_req_fields(); $limit_req_fieldsize = $s->limit_req_fieldsize(); $limit_req_line = $s->limit_req_line(); $path = $s->path(); $hostname = $s->server_hostname(); $port = $s->port(); $server_admin = $s->server_admin(); $proc = $s->process(); $timeout = $s->timeout(); $loglevel = $s->loglevel(); my $server = Apache2::ServerUtil->server; my $vhosts = 0; for (my $s = $server->next; $s; $s = $s->next) { $vhosts++; } print "There are $vhosts virtual hosts";=head1 DescriptionC<Apache2::ServerRec> provides the Perl API for Apache server_recobject.C<L<Apache2::ServerUtil|docs::2.0::api::Apache2::ServerUtil>> providesan extra functionality.=head1 APIC<Apache2::ServerRec> provides the following functions and/or methods:=head2 C<error_fname>Get/set the C<ErrorLog> file value (e.g. F<logs/error_log>) $error_fname = $s->error_fname(); $prev_error_fname = $s->error_fname($new_error_fname);=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item opt arg1: C<$new_error_fname> ( string )If passed, sets the new value for C<ErrorLog>Note the L<limited functionality under threadedMPMs|/Limited_Functionality_under_Threaded_MPMs>.=item ret: C<$error_fname> ( string )Returns the C<ErrorLog> value setting.If C<$new_error_fname> is passed returns the setting before the change.=item since: 2.0.00=back=head2 C<is_virtual>Test whether C<$s> is a virtual host object $is_virtual = $s->is_virtual();=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item ret: C<$is_virtual> ( boolean )Returns the is_virtual setting.If C<$new_is_virtual> is passed, returns the setting before thechange.=item since: 2.0.00=backExample: print "This is a virtual host" if $s->is_virtual();=head2 C<keep_alive>Get/set the C<KeepAlive> setting, which specifies whether Apacheshould accept more than one request over the same connection from thesame client. $keep_alive = $s->keep_alive(); $prev_keep_alive = $s->keep_alive($new_keep_alive);=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item opt arg1: C<$new_keep_alive> ( boolean )If passed, sets the new keep_alive.Note the L<limited functionality under threadedMPMs|/Limited_Functionality_under_Threaded_MPMs>.=item ret: C<$keep_alive> ( boolean )Returns the C<KeepAlive> setting.If C<$new_keep_alive> is passed, returns the setting before thechange.=item since: 2.0.00=back=head2 C<keep_alive_max>Get/set the C<MaxKeepAliveRequest> setting, which specifies themaximum number of requests Apache will serve over a C<KeepAlive>connection. $keep_alive_max = $s->keep_alive_max(); $prev_keep_alive_max = $s->keep_alive_max($new_keep_alive_max);=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item opt arg1: C<$new_keep_alive_max> ( integer )If passed, sets the new keep_alive_max.Note the L<limited functionality under threadedMPMs|/Limited_Functionality_under_Threaded_MPMs>.=item ret: C<$keep_alive_max> ( integer )Returns the keep_alive_max setting.If C<$new_keep_alive_max> is passed, returns the setting before thechange.=item since: 2.0.00=back=head2 C<keep_alive_timeout>Get/set the C<KeepAliveTimeout> setting (in microsecs), whichspecifies how long Apache will wait for another request beforebreaking a C<KeepAlive> connection. $keep_alive_timeout = $s->keep_alive_timeout(); $prev_keep_alive_timeout = $s->keep_alive_timeout($new_timeout);=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item opt arg1: C<$new_keep_alive_timeout> ( integer )The expected value is in microsecs.If passed, sets the new C<KeepAlive> timeout.Note the L<limited functionality under threadedMPMs|/Limited_Functionality_under_Threaded_MPMs>.=item ret: C<$keep_alive_timeout> ( integer )Returns the C<KeepAlive> timeout value (in microsecs).If C<$new_timeout> is passed, returns the setting before the change.=item since: 2.0.00=back=head2 C<limit_req_fields>Get/set limit on number of request header fields $limit_req_fields = $s->limit_req_fields(); $prev_limit_req_fields = $s->limit_req_fields($new_limit_req_fields);=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item opt arg1: C<$new_limit_req_fields> ( integer )If passed, sets the new request headers number limit.Note the L<limited functionality under threadedMPMs|/Limited_Functionality_under_Threaded_MPMs>.=item ret: C<$limit_req_fields> ( integer )Returns the request headers number limit.If C<$new_limit_req_fields> is passed, returns the setting before thechange.=item since: 2.0.00=back=head2 C<limit_req_fieldsize>Get/set limit on size of any request header field $limit_req_fieldsize = $s->limit_req_fieldsize(); $prev_limit = $s->limit_req_fieldsize($new_limit);=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item opt arg1: C<$new_limit_req_fieldsize> ( integer )If passed, sets the new request header size limit.Note the L<limited functionality under threadedMPMs|/Limited_Functionality_under_Threaded_MPMs>.=item ret: C<$limit_req_fieldsize> ( integer )Returns the request header size limit.If C<$new_limit> is passed, returns the setting before the change.=item since: 2.0.00=back=head2 C<limit_req_line>Get/set limit on size of the HTTP request line $limit_req_line = $s->limit_req_line(); $prev_limit_req_line = $s->limit_req_line($new_limit_req_line);=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item opt arg1: C<$new_limit_req_line> ( integer )If passed, sets the new request line limit value.Note the L<limited functionality under threadedMPMs|/Limited_Functionality_under_Threaded_MPMs>.=item ret: C<$limit_req_line> ( integer )Returns the request line limit valueIf C<$new_limit_req_line> is passed, returns the setting before thechange.=item since: 2.0.00=back=head2 C<loglevel>Get/set the C<LogLevel> directive value $loglevel = $s->loglevel(); $prev_loglevel = $s->loglevel($new_loglevel);=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item opt arg1: C<$new_loglevel> ( C<L<Apache2::Const :logconstant|docs::2.0::api::Apache2::Const/C__log_>> )If passed, sets a new C<LogLevel> valueNote the L<limited functionality under threadedMPMs|/Limited_Functionality_under_Threaded_MPMs>.=item ret: C<$loglevel> ( C<L<Apache2::Const :logconstant|docs::2.0::api::Apache2::Const/C__log_>> )Returns the C<LogLevel> value as a constant.If C<$new_loglevel> is passed, returns the setting before the change.=item since: 2.0.00=backFor example, to set the C<LogLevel> value to C<info>: use Apache2::Const -compile => qw(LOG_INFO); $s->loglevel(Apache2::Const::LOG_INFO);=head2 C<next>The next server record in the list (if there are vhosts) $s_next = $s->next();=over 4=item obj: C<$s>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item ret: C<$s_next>( C<L<Apache2::ServerRec object|docs::2.0::api::Apache2::ServerRec>> )=item since: 2.0.00
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -