Form Input


form-input-nginx-module - an NGINX module that reads HTTP POST and PUT request body encoded in application/x-www-form-urlencoded, and parses the arguments in request body into NGINX variables.

This module depends on the ngx_devel_kit (NDK) module.


  1. Get the NGINX source code from
  2. Get the ngx_devel_kit source code from GitHub simpl-it/ngx_devel_kit repository
  3. Unpack the source code and build NGINX with this module.
$ wget ''
$ tar -xzvf nginx-0.8.28.tar.gz
$ cd nginx-0.8.28/

$ git-clone
$ git-clone

$ ./configure --add-module=/somepath/form-input-nginx-module --add-module=/somepath/ngx_devel_kit
$ make -j2
$ make install


set_form_input $variable;
set_form_input $variable argument;

set_form_input_multi $variable;
set_form_input_multi $variable argument;



location /foo {
  set_form_input $data;     # read "data" field into $data
  set_form_input $foo foo;  # read "foo" field into $foo
location /bar {
  set_form_input_multi $data;      # read all "data" field into $data
  set_form_input_multi $foo data;  # read all "data" field into $foo
  array_join ' ' $data;            # now $data is a string
  array_join ' ' $foo;             # now $foo is a string


The following versions of NGINX should work with this module:

  • 0.8.x <= 0.8.41 (last tested version is 0.8.43)
  • 0.7.x (last tested version is 0.7.67)


Changes with form-input-module v0.0.2

  • Supports set_form_input_multi
  • Supports PUT method

Changes with form-input-module v0.0.1

  • Supports set_form_input