{"id":17098866,"url":"https://github.com/wujunze/nginx-http-echo-module","last_synced_at":"2025-09-11T04:40:02.480Z","repository":{"id":43002617,"uuid":"94193769","full_name":"wujunze/nginx-http-echo-module","owner":"wujunze","description":"A simple Nginx echo module ","archived":false,"fork":false,"pushed_at":"2018-01-08T11:26:03.000Z","size":16,"stargazers_count":199,"open_issues_count":0,"forks_count":34,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-21T08:48:01.326Z","etag":null,"topics":["c","gcc","nginx","nginx-echo","nginx-lib","nginx-module","panda"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wujunze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-13T09:12:47.000Z","updated_at":"2025-03-12T15:16:03.000Z","dependencies_parsed_at":"2022-09-04T20:21:39.928Z","dependency_job_id":null,"html_url":"https://github.com/wujunze/nginx-http-echo-module","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wujunze/nginx-http-echo-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wujunze%2Fnginx-http-echo-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wujunze%2Fnginx-http-echo-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wujunze%2Fnginx-http-echo-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wujunze%2Fnginx-http-echo-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wujunze","download_url":"https://codeload.github.com/wujunze/nginx-http-echo-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wujunze%2Fnginx-http-echo-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274578478,"owners_count":25310957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","gcc","nginx","nginx-echo","nginx-lib","nginx-module","panda"],"created_at":"2024-10-14T15:08:26.034Z","updated_at":"2025-09-11T04:40:02.440Z","avatar_url":"https://github.com/wujunze.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Practical development Nginx Module\r\n\r\n[![Build Status](https://travis-ci.org/wujunze/nginx-http-echo-module.svg?branch=master)](https://travis-ci.org/wujunze/nginx-http-echo-module)\r\n\r\n### [简体中文](http://git.oschina.net/wujunze/nginx_module_echo/blob/master/README_zh.md)\r\n## nginx_module_echo\r\necho string\r\n\r\n## Nginx Version\r\nNginx1.0.10 https://github.com/nginx/nginx/releases/tag/release-1.0.10\r\n![nginx1.0.10.png](https://ooo.0o0.ooo/2017/06/13/593fc07b90e28.png)\r\n\r\n## The development environment configuration\r\n```shell\r\nOS : CentOS Linux release 7.2.1511 (Core)\r\n```\r\n![Server_info.png](https://ooo.0o0.ooo/2017/06/13/593fc07b5dff4.png) \r\n![Server_CPU_info.png](https://ooo.0o0.ooo/2017/06/13/593fc0825053e.png)\r\n\r\n## Install a clean compile Nginx\r\n1. Download a Nginx10.10 and unpack it\r\n![nginx1.0.10.png](https://ooo.0o0.ooo/2017/06/13/593fc07cd07e2.png)\r\n\r\n2. Install the GCC and the lib Nginx need\r\n![install_GCC.png](https://ooo.0o0.ooo/2017/06/13/593fc06152dd0.png)\r\n![Nginx_lib.png](https://ooo.0o0.ooo/2017/06/13/593fc078c3c2b.png)\r\n\r\n3. ./configure --prefix=/usr/local/nginx \u0026\u0026 make \u0026\u0026 make install\r\n![configure_ok.png](https://ooo.0o0.ooo/2017/06/13/593fc061b5a9f.png)\r\n![make \u0026\u0026 make install.png](https://ooo.0o0.ooo/2017/06/13/593fc074c9b29.png)\r\n![nginx_install_ok.png](https://ooo.0o0.ooo/2017/06/13/593fc080db608.png)\r\n\r\n4. Nginx run\r\n![start_nginx.png](https://ooo.0o0.ooo/2017/06/13/593fc08044567.png)\r\n![nginx_install_ok.png](https://ooo.0o0.ooo/2017/06/13/593fc080db608.png)\r\n\r\n## Definition module configuration structure\r\n```C\r\ntypedef struct {\r\n    ngx_str_t ed;  //该结构体定义在这里 https://github.com/nginx/nginx/blob/master/src/core/ngx_string.h\r\n} ngx_http_echo_loc_conf_t;\r\n```\r\n![define_moudle_conf.png](https://ooo.0o0.ooo/2017/06/13/593fc0615456f.png)\r\n\r\n## Define Nginx instruction and parameter conversion function\r\n![定义指令和参数转化函数.png](https://ooo.0o0.ooo/2017/06/13/593fc0529132f.png)\r\n\r\n## definition module Context\r\n1. Define the type of ngx_http_module_t structure variables\r\n![定义注入点结构体.png](https://ooo.0o0.ooo/2017/06/13/593fc052953a4.png)\r\n2. Initialize a configuration structure\r\n![初始化一个配置结构体.png](https://ooo.0o0.ooo/2017/06/13/593fc05277601.png)\r\n3. Will the father block configuration information incorporated into this structure Implement the configuration of inheritance\r\n![合并父block的配置信息.png](https://ooo.0o0.ooo/2017/06/13/593fc0528ec4a.png)\r\n\r\n## Write the Handler really work part of the module\r\n![Nginx模块handler.png](https://ooo.0o0.ooo/2017/06/13/593fc0616a385.png)\r\n\r\n## Combination Nginx module\r\n![组合Nginx Module.png](https://ooo.0o0.ooo/2017/06/13/593fc052aa29a.png)\r\n\r\n## Finishing module code According to the Nginx official specification\r\n![ok_file.png](https://ooo.0o0.ooo/2017/06/13/593fc061b7d7a.png)\r\n\r\n## Write the config file\r\n```shell\r\nngx_addon_name=ngx_http_echo_module\r\nHTTP_MODULES=\"$HTTP_MODULES ngx_http_echo_module\"\r\nNGX_ADDON_SRCS=\"$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_echo_module.c\"\r\n```\r\n## make \u0026\u0026 make install\r\n```shell\r\n ./configure --prefix=/usr/local/nginx/ --add-module=/root/ngx_dev \u0026\u0026 make \u0026\u0026 make install\r\n```\r\n## Successful installation\r\n![make install.png](https://ooo.0o0.ooo/2017/06/13/593fc052be07d.png)\r\n\r\n## Modify the Nginx configuration file test Module\r\n![test module.png](https://ooo.0o0.ooo/2017/06/13/593fc0614f91a.png)\r\n\r\n## Nginx echo Module The successful running\r\n![module ok.png](https://ooo.0o0.ooo/2017/06/13/593fc05292b08.png)\r\n\r\n# If the repo help you welcome star fork    Thanks!\r\n\r\n\u003e ## reference\r\n\u003e 1. http://wiki.nginx.org/Configuration\r\n\u003e 2. http://tengine.taobao.org/book/\r\n\u003e 3. **http://blog.codinglabs.org/articles/intro-of-nginx-module-development.html**\r\n\u003e 4. https://www.nginx.com/resources/wiki/modules/\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwujunze%2Fnginx-http-echo-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwujunze%2Fnginx-http-echo-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwujunze%2Fnginx-http-echo-module/lists"}