server { # .... location /deploy { client_body_buffer_size 3M; client_max_body_size 3M; content_by_lua_file /path/to/handler.lua; } }