标签:style class blog code http 文件
监听端口属于server虚拟主机,由server{}块内的listen配置项决定。static void * ngx_http_core_create_main_conf(ngx_conf_t *cf) { ngx_http_core_main_conf_t *cmcf; .... return cmcf; }
typedef struct { .... ngx_array_t *ports; /* 保存http块配置项内监听的所有端口 */ .... } ngx_http_core_main_conf_t;
typedef struct { ngx_int_t family; in_port_t port; ngx_array_t addrs; /* array of ngx_http_conf_addr_t */ } ngx_http_conf_port_t;
typedef struct { ngx_http_listen_opt_t opt; ngx_hash_t hash; ngx_hash_wildcard_t *wc_head; ngx_hash_wildcard_t *wc_tail; #if (NGX_PCRE) ngx_uint_t nregex; ngx_http_server_name_t *regex; #endif /* the default server configuration for this address:port */ ngx_http_core_srv_conf_t *default_server; ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */ } ngx_http_conf_addr_t;
标签:style class blog code http 文件
原文地址:http://blog.csdn.net/nestler/article/details/30777749