{"id":44610403,"url":"https://github.com/paravz/nginx-dev-examples","last_synced_at":"2026-02-26T22:01:17.725Z","repository":{"id":56444006,"uuid":"237322282","full_name":"paravz/nginx-dev-examples","owner":"paravz","description":"Mirror of hg::https://hg.nginx.org/nginx-dev-examples/ with instructions to configure VSCode for NGINX development","archived":false,"fork":false,"pushed_at":"2020-11-07T06:16:16.000Z","size":1472,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"nginx-vscode","last_synced_at":"2023-08-21T09:20:44.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paravz.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":"2020-01-30T22:59:04.000Z","updated_at":"2023-08-21T09:20:44.463Z","dependencies_parsed_at":"2022-08-15T18:50:36.268Z","dependency_job_id":null,"html_url":"https://github.com/paravz/nginx-dev-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/paravz/nginx-dev-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paravz%2Fnginx-dev-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paravz%2Fnginx-dev-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paravz%2Fnginx-dev-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paravz%2Fnginx-dev-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paravz","download_url":"https://codeload.github.com/paravz/nginx-dev-examples/tar.gz/refs/heads/nginx-vscode","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paravz%2Fnginx-dev-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29874452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T21:05:00.265Z","status":"ssl_error","status_checked_at":"2026-02-26T20:57:13.669Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-14T12:00:22.734Z","updated_at":"2026-02-26T22:01:17.717Z","avatar_url":"https://github.com/paravz.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"## Modules\n\n### hello_world\n\nInstalls location content handler to produce specific output.\n\n- #1 produces the predefined output \"Hello, world!\"\n- #2 allows setting text and HTTP status code\n- #3 supports variables in output text\n\n### access\n\nInstalls an ACCESS phase handler and checks if user is allowed to access the\nresource.\n\n- #1 makes sure the User-Agent header contains the specified string\n- #2 verifies user-provided hash md5(uri, secret).\n\n### set_header\n\nInstalls header filter handler and allows to add output headers.\n\n- #1 one header is supported\n- #2 multiple headers are supported\n- #3 variables are supported in header values\n\n### append\n\nInstalls header and body filter handlers and allows appending text to the\noutput.\n\n- #1 a string is appended\n- #2 md5 hash of the entire body is appended\n- #3 subrequest text is appended\n\n### md5\n\nCreates a variable with the md5 of the provided complex value.\n\n## Development Guide\n\nFor more information on module development, see the NGINX development guide:\n\n    http://nginx.org/en/docs/dev/development_guide.html\n\n\n## NGINX Development and Debugging in VS Code\n\nLearning NGINX modules is a lot easier in [VS Code](https://code.visualstudio.com/), use instructions below to setup your Linux C/C++ development environment.\n\n  ![NGINX VScode Debugging session](/vscode1.png?raw=true \"Breakpoint in access_1 NGINX module\")\n\n### Prepare\n\n- Download NGINX into *nginx* directory\n\n  `git clone https://github.com/nginx/nginx`\n\n  or\n\n  `hg clone http://hg.nginx.org/nginx`\n\n- Install dependencies\n\n    - Install NGINX [build dependencies](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#installing-nginx-dependencies) or use your package manager: `sudo dnf install -y pcre-devel zlib-devel openssl-devel`\n\n    - Install [C/C++ IntelliSense extension](https://github.com/Microsoft/vscode-cpptools/releases) in VS Code GUI or run from terminal: `code --install-extension ms-vscode.cpptools`\n\n    - Install GDB: `sudo dnf install -y gdb`\n\n- Open *access_1/ngx_http_ua_access_module.c* in VS Code\n\n- Run initial NGINX build (one time)\n\n    Navigate to \"Terminal \u003e Run Task\" and choose `nginx: initial configure and build active module`\n\n### Develop and Debug\n\n- Open *access_1/ngx_http_ua_access_module.c* to compile *access_1* module\n\n- Run default build task using: \"Ctrl + Shift + B\" or choose `Terminal \u003e Run Build Task...`\n\n    This task from *.vscode/tasks.json* builds NGINX with module that is currently active in editor and stops NGINX.\n\n- Run and/or debug\n\n    - Press \"F5\" to start nginx under GDB. GDB launch configration is defined in *.vscode/launch.json*\n\n    - Set a breakpoint in module's handler (ie *access_1/ngx_http_ua_access_module.c:76*) and make a request: `curl localhost:8000`\n        - See [VS Code debugging documentation](https://code.visualstudio.com/docs/cpp/cpp-debug) for more details\n\n    - Press \"Shift F5\" to stop debugging session.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparavz%2Fnginx-dev-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparavz%2Fnginx-dev-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparavz%2Fnginx-dev-examples/lists"}