The Apache Server
class contains information related to the server, or
virtual host which is handling the current request. It also associated the
Process
object related to the request as well, which is
obtained using the Server::process()
method.
You can obtain the Server
instance associated with
the current request using the Request::server()
method.
Table B.2, “Apache Server Methods” contains the exhaustive list of methods, in alphabetical order. The documentation of each method follows.
Table B.2. Apache Server Methods
Type | Name | Args |
---|---|---|
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
method |
| 0 |
The official documentation for this method comes directly from the Doxygen
documentation from the Apache source, defined in line 1192 of
httpd.h
:
I haven't got a clue.
I have pneumonia and am in a trance right now and don't feel like digging for details. Enjoy.
defn_line_number()
returns the line of the config
file that the server was defined on.
defn_name()
returns the name of the server —
the fully qualified domain name. This varies with the particular virtual host
that is responding to the request.
error_fname()
returns the name of the error log.
error_log()
returns a file descriptor that references
the error log.
is_virtual()
returns 1 is this is a virtual host
handling the request, 0 otherwise (the default/main server host — you know
— the one that says "If you're seeing this page instead of the one you
expected ... you must be a n00b". Or something like that. Sorry, still listening
to Wilco ... You try writing this boring documentation on a Sunday afternoon).
keep_alive()
returns 1 if keepalive is enabled
(client requires a persistent connection), 0 otherwise.
keep_alive_max()
returns the maximum number of
requests for a keepalive connection. See the
Apache Core documentation for more information.
keep_alive_timeout()
returns the APR interval
(seconds) that server will wait for another request. See the Apache
Core documentation for more information.
limit_req_fields()
returns the limit on number of
request header fields. See the
Apache Core documentation for more information.
limit_req_fieldsize()
returns the limit on size of
any request header field. See the
Apache Core documentation for more information.
limit_req_line()
returns the limit on size of the
HTTP request line. See the Apache
Core documentation for more information.
loglevel()
returns the log level for this server. See
the Apache
Core documentation for more information.
lookup_defaults()
is unimplemented. This is a C-level
module configuration function which is basically useless from Ruby.
This function returns nil
names()
returns an APR array of server aliases for
this host. For more information, see the Apache documentation on ServerAlias.
next()
returns the next Server object in the
list.
path()
returns the path name of the server path. For
more information, see the Apache documentation on ServerPath.
pathlen()
returns the length in bytes of the
ServerPath
.
port()
returns the port number on the server that the
request came in on.
port()
returns the Process
object associated with this server. See Section 5, “The Apache Process Class” for
more information.
server_admin()
returns the name of the server admin.
For more information, see the Apache documentation on ServerAdmin.
server_hostname()
returns the server name handling
the request. For more information, see the Apache documentation on ServerName.
timeout()
returns the timeout interval (seconds).
wild_names()
returns and APR array containing the
wildcarded names for ServerAlias
servers. For more
information, see the Apache documentation on ServerAlias.