uWSGI and SCGI

Before reading the rest of the chapter, you should know that Nginx offers two other CGI-derived module implementations:

  • The uWSGI module allows Nginx to communicate with applications through the uwsgi protocol, itself derived from Web Server Gateway Interface (WSGI). The most commonly used (the unique) server implementing the uwsgi protocol is the unoriginally named uWSGI server. Its latest documentation can be found at http://uwsgi-docs.readthedocs.io/en/latest/. This module will prove useful to Python adepts, seeing as the uWSGI project was designed mainly for Python applications.
  • SCGI, which stands for Simple Common Gateway Interface, is a variant of the CGI protocol, much like FastCGI. Younger than FastCGI since its specification was first published in 2006, SCGI was designed to be easier to implement and as its name suggests: simple. It is not related to a particular programming language. SCGI interfaces and modules can be found in a variety of software projects such as Apache, IIS, Java, Cherokee, and a lot more.

There are no major differences in the way Nginx handles the FastCGI, uWSGI, and SCGI protocols: each of these has its respective module, containing similarly named directives. The following table lists a couple of directives from the FastCGI module, which are detailed in the following sections, and their uWSGI and SCGI equivalents:

FastCGI module

uWSGI equivalent

SCGI equivalent

fastcgi_pass

uwsgi_pass

scgi_pass

fastcgi_cache

uwsgi_cache

scgi_cache

fastcgi_temp_path

uwsgi_temp_path

scgi_temp_path

 

Directive names and syntaxes are identical. In addition, the Nginx development team has been maintaining all three modules in parallel. New directives or directive updates are always applied to all of them. As such, the following sections will be documenting Nginx's implementation of the FastCGI protocol (since it is the most widely used), but they also apply to uWSGI and SCGI.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.12.184