File tree Expand file tree Collapse file tree 2 files changed +48
-6
lines changed
Expand file tree Collapse file tree 2 files changed +48
-6
lines changed Original file line number Diff line number Diff line change 1- #nginx_module_echo
1+ # nginx_module_echo
22echo string
3- #nginx version
4- Nginx1.0.10 https://github.com/nginx/nginx/releases/tag/release-1.0.10
3+
4+ # Nginxx Version
5+ Nginx1.0.10 https://github.com/nginx/nginx/releases/tag/release-1.0.10
6+ ![ image] ( https://wx1.sinaimg.cn/large/005LOzcmly1fgimmvpk3sj30mi04p3z9.jpg )
7+
8+ # The development environment configuration
9+ ``` shell
10+ OS : CentOS Linux release 7.2.1511 (Core)
11+ ```
12+ ![ image] ( https://wx4.sinaimg.cn/large/005LOzcmly1fgimnlvhh0j30s106imxw.jpg )
13+ ![ image] ( https://wx4.sinaimg.cn/large/005LOzcmly1fgimnlwy1fj315u0dwdhn.jpg )
14+
15+ # Install a clean compile Nginx
16+ 1 . Download a Nginx10.10 and unpack it
17+ ![ image] ( http://wx2.sinaimg.cn/large/005LOzcmly1fgimq77ahwj30pw05et9n.jpg )
18+
19+ 2 . Install the GCC and the lib Nginx need
20+ ![ image] ( https://wx4.sinaimg.cn/large/005LOzcmly1fgimv0hryoj30pd06djs8.jpg )
21+ ![ image] ( https://wx4.sinaimg.cn/large/005LOzcmly1fgimva84bbj30pa07fgms.jpg )
22+
23+ 3 . ./configure --prefix=/usr/local/nginx && make && make install
24+ ![ image] ( https://ws2.sinaimg.cn/large/005LOzcmly1fgimvz2rfkj30j10av75w.jpg )
25+ ![ image] ( https://wx2.sinaimg.cn/large/005LOzcmly1fgimw6cmh2j30ur06n757.jpg )
26+ ![ image] ( https://ws4.sinaimg.cn/large/005LOzcmly1fgimwezp9tj30qu0fdn0a.jpg )
27+ 4 . Nginx run
28+ ![ image] ( https://wx3.sinaimg.cn/large/005LOzcmly1fgimy3dkk5j30rr05ddh5.jpg )
29+ ![ image] ( https://ws1.sinaimg.cn/large/005LOzcmly1fgimyc58d3j31vk0qsq9y.jpg )
30+
31+ # Definition module configuration structure
32+ ``` C
33+ typedef struct {
34+ ngx_str_t ed; //该结构体定义在这里 https://github.com/nginx/nginx/blob/master/src/core/ngx_string.h
35+ } ngx_http_echo_loc_conf_t ;
36+ ```
37+ ![ image] ( https://wx2.sinaimg.cn/large/005LOzcmly1fgin4at3rsj30rp04g74r.jpg )
Original file line number Diff line number Diff line change 1- //
2- // Created by wujunze on 2017/6/12.
3- //
1+ /*
2+ * @file: nginx_moufle_echo.c
3+ * @brief: Nginx echo command output a string
4+ * @author: Panda <[email protected] > 5+ * @version: 1.0.1
6+ * @date: 2017/6/12
7+ *
8+ * Compile:
9+ * shell> ./configure --add-module=/path/to/nginx_moudle_echo.c
10+ */
11+
12+ //定义模块配置结构
413typedef struct {
514 ngx_str_t ed ; //该结构体定义在这里 https://github.com/nginx/nginx/blob/master/src/core/ngx_string.h
615} ngx_http_echo_loc_conf_t ;
You can’t perform that action at this time.
0 commit comments