Apache 1.3 API Documentation

Routine ap_get_server_name

Definition:

char *ap_get_server_name(const request_rec *r);
     

Usage example:

char *string;
string = ap_get_server_name();
     

Returns the hostname of the server running Apache.

There are two options regarding what the "name" of a server is. The "canonical" name as defined by ServerName and Port, or the "client's name" as supplied by a possible Host: header or full URI.

See also:
ap_add_version_component, ap_get_server_built, ap_get_server_version

Previous: ap_get_server_built Next: ap_get_server_port

Table of Contents (Routines, Structures, Data Cells, Constants)