O'Reilly logo

Apache: The Definitive Guide, Second Edition by Peter Laurie, Ben Laurie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14.2. Per-Server Configuration

Since a single instance of Apache may be called on to handle a request for any of the configured virtual hosts (or the main host), a structure is defined that holds the information related to each host. This structure, server_rec , is defined in httpd.h:

struct server_rec { server_rec *next; /* Description of where the definition came from */ const char *defn_name; unsigned defn_line_number; /* Full locations of server config info */ char *srm_confname; char *access_confname; /* Contact information */ char *server_admin; char *server_hostname; unsigned short port; /* For redirects, etc. */ /* Log files --- note that transfer log is now in the modules... */ char *error_fname; FILE *error_log; int loglevel; /* Module-specific configuration for server, and defaults... */ int is_virtual; /* True if this is the virtual server */ void *module_config; /* Config vector containing pointers to * modules' per-server config structures. */ void *lookup_defaults; /* MIME type info, etc., before we start * checking per-directory info. */ /* Transaction handling */ server_addr_rec *addrs; int timeout; /* Timeout, in seconds, before we give up */ int keep_alive_timeout; /* Seconds we'll wait for another request */ int keep_alive_max; /* Maximum requests per connection */ int keep_alive; /* Maximum requests per connection */ int send_buffer_size; /* Size of TCP send buffer (in bytes) */ char *path; /* Pathname for ServerPath */ int pathlen; /* Length of path ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required