Skip to content

Simple example on how to implement a nginx C module to obtain: Method, IP, User-Agent, Cookies, and Post/Get Variables

Notifications You must be signed in to change notification settings

bnchdan/ngx_http_hello_world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ngx_http_hello_world

Simple example on how to implement a nginx C module to obtain: Method, IP, User-Agent, Cookies, and Post/Get Variables

Install

  1. Download nginx
wget https://nginx.org/download/nginx-1.18.1.tar.gz
tar -xzf nginx-1.18.1.tar.gz
export NGINX_PATH=$(pwd)/nginx-1.18.1/
  1. Compile the module
git clone https://github.com/bnchdan/ngx_http_hello_world
cd ngx_http_hello_world
./build.sh
  1. Compile the module
git clone https://github.com/bnchdan/ngx_http_hello_world
cd ngx_http_hello_world
./build.sh

Configuration

load_module /my_path/ngx_http_hello_world_module.so;
...
http {
  ...
  server{
    ...
    location /hello_world {
        hello_world;
    }
    ...
  }
  ...
}
...

go to url/hello_world image

image

About

Simple example on how to implement a nginx C module to obtain: Method, IP, User-Agent, Cookies, and Post/Get Variables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published