nginx_conf
2016-08-30 17:53:10 9 举报
AI智能生成
nginx.conf
作者其他创作
大纲/内容
nginx.conf
worker_processes 1;
ngx_core_module
ngx_core_conf_t
ngx_set_worker_processes
NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1
events
worker_connections 1024;
ngx_event_core_module
ngx_event_conf_t
ngx_event_connections
NGX_EVENT_CONF|NGX_CONF_TAKE1
http
include mime.types;
ngx_conf_module
ngx_conf_include
NGX_ANY_CONF|NGX_CONF_TAKE1
types
ngx_http_core_module
NGX_HTTP_LOC_CONF_OFFSET
ngx_http_core_loc_conf_t
ngx_http_core_types
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS
default_type application/octet-stream;
default_type
ngx_conf_set_str_slot
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1
sendfile on;
sendfile
ngx_conf_set_flag_slot
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_FLAG
keepalive_timeout 65;
keepalive_timeout
ngx_http_core_keepalive
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE12
server
ngx_http_core_server
NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS
listen 80;
NGX_HTTP_SRV_CONF_OFFSET
ngx_http_core_listen
ngx_http_listen_opt_t
根据listen 子项,配置该结构
ngx_http_add_address
ngx_http_conf_addr_t
将ngx_http_listen_opt_t赋值为该结构体,并初始化该结构体
将ngx_http_core_srv_conf_t赋值给该结构体的servers
NGX_HTTP_SRV_CONF|NGX_CONF_1MORE
server_name localhost;
ngx_http_core_server_name
ngx_http_core_srv_conf_t->server_names
server = cscf
name = \"localhost\"
location /
ngx_http_core_location
NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_BLOCK|NGX_CONF_TAKE12
root html;
子主题
ngx_http_core_root
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1
index index.html index.htm;
ngx_http_index_module
ngx_http_index_set_index
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE
error_page 500 502 503 504 /50x.html;
ngx_http_core_error_page
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_2MORE
location = /50x.html
0 条评论
回复 删除
下一页