Author image Olli Hollmen
and 1 contributors


JRPC::Nginx - JSON-RPC Services in Nginx runtime


Nginx main config /etc/nginx/nginx.conf includes /etc/nginx/conf.d/*.conf. Add a Perl config in /etc/nginx/conf.d/perl.conf (sometimes the name nginx-perl.conf is used):

    perl_modules  /home/theuser/src/miscapps/JRPC/examples;

Assign the handler to a URL in your site config (in /etc/nginx/sites-available/)

   location /Math { perl JRPC::Nginx::handler; }


JRPC::Nginx allows to host JSON-RPC 2.0 services in Nginx web server runtime similar to Apache2 / mod_perl (See JRPC::Apache2). The main benefit of Nginx is its lightweight memory consumption, scalability for request volume (see various studies) and ultrafast request processing speed.



JSON-RPC Handler / Dispatcher for Nginx. This handler has to be assigned to a URL path location in the site configuration in /etc/nginx/sites-available/ (see SYNOPSIS section above). It is not meant to be called explicitly.

For writing service packages and handler methods, see the rest of the JRPC documentation.


  • For Nginx Perl API See:


Installation of Nginx on Debian (nginx-extras includes Perl module):

   sudo apt-get install nginx-extras nginx-doc

nginx-extras contains all the extra Nginx modules (contained in Nginx main codebase) statically linked in.