Apache::Server - Perl API for for Apache server record accessors
use Apache::Server ();
META: to be completed
Apache::Server provides the following functions and/or methods:
Apache::Server
process
META: Autogenerated - needs to be reviewed/completed
The process this server is running in
$proc = $s->process();
$s
$proc
Apache::Process
next
The next server in the list (if there are vhosts)
$next_s = $s->next();
$next_s
For example the following code traverses all the servers, starting from the base server and continuing to vhost servers, counting all vhosts:
use Apache::Server (); use Apache::ServerUtil (); my $server = Apache->server; my $vhosts = 0; for (my $s = $server->next; $s; $s = $s->next) { $vhosts++; }
server_admin
Get/set the server admin value
$server_admin = $s->server_admin(); $prev_server_admin = $s->server_admin($new_server_admin);
$new_server_admin
If passed, sets the new server_admin.
$server_admin
Returns the server_admin setting.
If $new_server_admin is passed returns the setting before the change.
server_hostname
Get/set the server hostname value
$server_hostname = $s->server_hostname(); $prev_server_hostname = $s->server_hostname($new_server_hostname);
$new_server_hostname
If passed, sets the new server_hostname.
$server_hostname
Returns the server_hostname setting.
If $new_server_hostname is passed returns the setting before the change.
port
Get/set the port value
$port = $s->port(); $prev_port = $s->port($new_port);
$new_port
If passed, sets the new port.
$port
Returns the port setting.
If $new_port is passed returns the setting before the change.
error_fname
Get/set the error_fname value
$error_fname = $s->error_fname(); $prev_error_fname = $s->error_fname($new_error_fname);
$new_error_fname
If passed, sets the new error_fname.
$error_fname
Returns the error_fname setting.
If $new_error_fname is passed returns the setting before the change.
loglevel
Get/set the log level value
$loglevel = $s->loglevel(); $prev_loglevel = $s->loglevel($new_loglevel);
$new_loglevel
If passed, sets the new loglevel.
$loglevel
Returns the loglevel setting.
If $new_loglevel is passed returns the setting before the change.
is_virtual
Get/set the is_virtual value
$is_virtual = $s->is_virtual(); $prev_is_virtual = $s->is_virtual($new_is_virtual);
$new_is_virtual
If passed, sets the new is_virtual.
META: this is wrong, it should be a read only accessor
$is_virtual
Returns the is_virtual setting.
If $new_is_virtual is passed returns the setting before the change.
module_config
Get/set config vector containing pointers to modules' per-server config structures.
$module_config = $s->module_config(); $prev_module_config = $s->module_config($new_module_config);
new_module_config
Apache::ConfVector
If passed, sets the new module_config.
$module_config
Returns the module_config setting.
If $new_module_config is passed returns the setting before the change.
$new_module_config
lookup_defaults
Get/set the lookup_defaults value. MIME type info, etc., before we start checking per-directory info.
$lookup_defaults = $s->lookup_defaults(); $prev_lookup_defaults = $s->lookup_defaults($new_lookup_defaults);
$new_lookup_defaults
If passed, sets the new lookup_defaults.
$lookup_defaults
Returns the lookup_defaults setting.
If $new_lookup_defaults is passed returns the setting before the change.
addrs
Get/set the addrs value
$addrs = $s->addrs(); $prev_addrs = $s->addrs($new_addrs);
$new_addrs
Apache::ServerAddr
If passed, sets the new addrs.
$addrs
Returns the addrs setting.
If $new_addrs is passed returns the setting before the change.
timeout
Get/set the timeout, as an apr interval, before we give up
$timeout = $s->timeout(); $prev_timeout = $s->timeout($new_timeout);
$new_timeout
If passed, sets the new timeout.
$timeout
Returns the timeout setting.
If $new_timeout is passed returns the setting before the change.
keep_alive_timeout
Get/set the apr interval we will wait for another request
$keep_alive_timeout = $s->keep_alive_timeout(); $prev_keep_alive_timeout = $s->keep_alive_timeout($new_keep_alive_timeout);
$new_keep_alive_timeout
If passed, sets the new keep_alive_timeout.
$keep_alive_timeout
Returns the keep_alive_timeout setting.
If $new_keep_alive_timeout is passed returns the setting before the change.
keep_alive_max
Get/set maximum requests per connection
$keep_alive_max = $s->keep_alive_max(); $prev_keep_alive_max = $s->keep_alive_max($new_keep_alive_max);
$new_keep_alive_max
If passed, sets the new keep_alive_max.
$keep_alive_max
Returns the keep_alive_max setting.
If $new_keep_alive_max is passed returns the setting before the change.
keep_alive
Use persistent connections?
$keep_alive = $s->keep_alive(); $prev_keep_alive = $s->keep_alive($new_keep_alive);
$new_keep_alive
If passed, sets the new keep_alive.
$keep_alive
Returns the keep_alive setting.
If $new_keep_alive is passed returns the setting before the change.
path
Get/set pathname for ServerPath
$path = $s->path(); $prev_path = $s->path($new_path);
$new_path
If passed, sets the new path.
$path
Returns the path setting.
If $new_path is passed returns the setting before the change.
names
Get/set normal names for ServerAlias servers
$names = $s->names(); $prev_names = $s->names($new_names);
$new_names
APR::ArrayHeader
If passed, sets the new names.
$names
Returns the names setting.
If $new_names is passed returns the setting before the change.
wild_names
Wildcarded names for ServerAlias servers
$wild_names = $s->wild_names(); $prev_wild_names = $s->wild_names($new_wild_names);
$new_wild_names
If passed, sets the new wild_names.
$wild_names
Returns the wild_names setting.
If $new_wild_names is passed returns the setting before the change.
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);
$new_limit_req_line
If passed, sets the new limit_req_line.
$limit_req_line
Returns the limit_req_line setting.
If $new_limit_req_line is passed returns the setting before the change.
limit_req_fieldsize
limit on size of any request header field
$limit_req_fieldsize = $s->limit_req_fieldsize(); $prev_limit_req_fieldsize = $s->limit_req_fieldsize($new_limit_req_fieldsize);
$new_limit_req_fieldsize
If passed, sets the new limit_req_fieldsize.
$limit_req_fieldsize
Returns the limit_req_fieldsize setting.
If $new_limit_req_fieldsize is passed returns the setting before the change.
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);
$new_limit_req_fields
If passed, sets the new limit_req_fields.
$limit_req_fields
Returns the limit_req_fields setting.
If $new_limit_req_fields is passed returns the setting before the change.
mod_perl 2.0 documentation.
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 1.1.
The mod_perl development team and numerous contributors.
To install mod_perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm mod_perl
CPAN shell
perl -MCPAN -e shell install mod_perl
For more information on module installation, please visit the detailed CPAN module installation guide.