Nginx 源码结构分析
Nginx 源码基本结构
$ tree -L 1
.
├── core
├── event
├── http
├── mail
├── misc
└── os
6 directories, 0 files
core 核心模块结构
event 事件驱动模型结构
http 模块结构
Nginx 源码的模块化结构
Last updated
$ tree -L 1
.
├── core
├── event
├── http
├── mail
├── misc
└── os
6 directories, 0 files
Last updated
├── nginx.c
├── nginx.h
├── ngx_array.c
├── ngx_array.h
├── ngx_hash.c
├── ngx_hash.h
├── ngx_list.c
├── ngx_list.h
├── ngx_queue.c
├── ngx_queue.h
├── ngx_radix_tree.c
├── ngx_radix_tree.h
├── ngx_rbtree.c
├── ngx_rbtree.h
├── ngx_output_chain.c
├── ngx_buf.c
├── ngx_buf.h
├── ngx_conf_file.c
├── ngx_conf_file.h
├── ngx_config.h
├── ngx_connection.c
├── ngx_connection.h
├── ngx_core.h
├── ngx_cpuinfo.c
├── ngx_crc32.c
├── ngx_crc32.h
├── ngx_crc.h
├── ngx_cycle.c
├── ngx_cycle.h
├── ngx_file.c
├── ngx_file.h
├── ngx_inet.c
├── ngx_inet.h
├── ngx_log.c
├── ngx_log.h
├── ngx_syslog.c
├── ngx_syslog.h
├── ngx_md5.c
├── ngx_md5.h
├── ngx_murmurhash.c
├── ngx_murmurhash.h
├── ngx_open_file_cache.c
├── ngx_open_file_cache.h
├── ngx_palloc.c
├── ngx_palloc.h
├── ngx_shmtx.c
├── ngx_shmtx.h
├── ngx_slab.c
├── ngx_slab.h
├── ngx_parse.c
├── ngx_parse.h
├── ngx_proxy_protocol.c
├── ngx_proxy_protocol.h
├── ngx_regex.c
├── ngx_regex.h
├── ngx_string.c
├── ngx_string.h
├── ngx_times.c
└── ngx_times.h
├── ngx_resolver.c
├── ngx_resolver.h
├── ngx_sha1.h
├── ngx_spinlock.c
├── ngx_crypt.c
├── ngx_crypt.h
.
├── modules
│ ├── ngx_aio_module.c
│ ├── ngx_devpoll_module.c
│ ├── ngx_epoll_module.c
│ ├── ngx_eventport_module.c
│ ├── ngx_kqueue_module.c
│ ├── ngx_poll_module.c
│ ├── ngx_rtsig_module.c
│ ├── ngx_select_module.c
│ └── ngx_win32_select_module.c
├── ngx_event_accept.c
├── ngx_event_busy_lock.c
├── ngx_event_busy_lock.h
├── ngx_event.c
├── ngx_event_connect.c
├── ngx_event_connect.h
├── ngx_event.h
├── ngx_event_mutex.c
├── ngx_event_openssl.c
├── ngx_event_openssl.h
├── ngx_event_openssl_stapling.c
├── ngx_event_pipe.c
├── ngx_event_pipe.h
├── ngx_event_posted.c
├── ngx_event_posted.h
├── ngx_event_timer.c
└── ngx_event_timer.h
1 directory, 26 files
.
├── modules
├── ngx_http_busy_lock.c
├── ngx_http_busy_lock.h
├── ngx_http.c
├── ngx_http_cache.h
├── ngx_http_config.h
├── ngx_http_copy_filter_module.c
├── ngx_http_core_module.c
├── ngx_http_core_module.h
├── ngx_http_file_cache.c
├── ngx_http.h
├── ngx_http_header_filter_module.c
├── ngx_http_parse.c
├── ngx_http_parse_time.c
├── ngx_http_postpone_filter_module.c
├── ngx_http_request_body.c
├── ngx_http_request.c
├── ngx_http_request.h
├── ngx_http_script.c
├── ngx_http_script.h
├── ngx_http_spdy.c
├── ngx_http_spdy_filter_module.c
├── ngx_http_spdy.h
├── ngx_http_spdy_module.c
├── ngx_http_spdy_module.h
├── ngx_http_special_response.c
├── ngx_http_upstream.c
├── ngx_http_upstream.h
├── ngx_http_upstream_round_robin.c
├── ngx_http_upstream_round_robin.h
├── ngx_http_variables.c
├── ngx_http_variables.h
└── ngx_http_write_filter_module.c
1 directory, 32 files