Apache2
|
Typedefs | |
typedef int(* | ap_vhost_iterate_conn_cb) (void *baton, conn_rec *conn, server_rec *s) |
Functions | |
void | ap_init_vhost_config (apr_pool_t *p) |
void | ap_fini_vhost_config (apr_pool_t *p, server_rec *main_server) |
const char * | ap_parse_vhost_addrs (apr_pool_t *p, const char *hostname, server_rec *s) |
const char * | ap_set_name_virtual_host (cmd_parms *cmd, void *dummy, const char *arg) |
int | ap_vhost_iterate_given_conn (conn_rec *conn, ap_vhost_iterate_conn_cb func_cb, void *baton) |
void | ap_update_vhost_given_ip (conn_rec *conn) |
void | ap_update_vhost_from_headers (request_rec *r) |
int | ap_update_vhost_from_headers_ex (request_rec *r, int require_match) |
int | ap_matches_request_vhost (request_rec *r, const char *host, apr_port_t port) |
typedef int(* ap_vhost_iterate_conn_cb) (void *baton, conn_rec *conn, server_rec *s) |
Callback function for every Name Based Virtual Host.
baton | Opaque user object |
conn | The current Connection |
s | The current Server |
void ap_fini_vhost_config | ( | apr_pool_t * | p, |
server_rec * | main_server | ||
) |
called after the config has been read to compile the tables needed to do the run-time vhost lookups
p | The pool to allocate out of |
main_server | The start of the virtual host list |
void ap_init_vhost_config | ( | apr_pool_t * | p | ) |
called before any config is read
p | Pool to allocate out of |
int ap_matches_request_vhost | ( | request_rec * | r, |
const char * | host, | ||
apr_port_t | port | ||
) |
Match the host in the header with the hostname of the server for this request.
r | The current request |
host | The hostname in the headers |
port | The port from the headers |
const char* ap_parse_vhost_addrs | ( | apr_pool_t * | p, |
const char * | hostname, | ||
server_rec * | s | ||
) |
handle addresses in "<VirtualHost>" statement
p | The pool to allocate out of |
hostname | The hostname in the VirtualHost statement |
s | The list of Virtual Hosts. |
const char* ap_set_name_virtual_host | ( | cmd_parms * | cmd, |
void * | dummy, | ||
const char * | arg | ||
) |
handle NameVirtualHost directive
cmd | Command Parameters structure |
dummy | NOT USED |
arg | a host of the form "<address>[:port]" |
void ap_update_vhost_from_headers | ( | request_rec * | r | ) |
ap_update_vhost_given_ip is never enough, and this is always called after the headers have been read. It may change r->server.
r | The current request |
int ap_update_vhost_from_headers_ex | ( | request_rec * | r, |
int | require_match | ||
) |
Updates r->server with the best name-based virtual host match, within the chain of matching virtual hosts selected by ap_update_vhost_given_ip.
r | The current request |
require_match | 1 to return an HTTP error if the requested hostname is not explicitly matched to a VirtualHost. |
void ap_update_vhost_given_ip | ( | conn_rec * | conn | ) |
given an ip address only, give our best guess as to what vhost it is
conn | The current connection |
int ap_vhost_iterate_given_conn | ( | conn_rec * | conn, |
ap_vhost_iterate_conn_cb | func_cb, | ||
void * | baton | ||
) |
For every virtual host on this connection, call func_cb.
conn | The current connection |
func_cb | Function called for every Name Based Virtual Host for this connection. |
baton | Opaque object passed to func_cb. |