Skip to Content
Nginx HTTP Server - Fourth Edition
book

Nginx HTTP Server - Fourth Edition

by Martin Bjerretoft Fjordvald, Nedelcu
February 2018
Beginner to intermediate
348 pages
9h 40m
English
Packt Publishing
Content preview from Nginx HTTP Server - Fourth Edition

Main directives

nginScript adds three new directives we can use to interface between the Nginx configuration and the JavaScript part:

Directive

Description

js_include

Context: http

Includes a nginScript file that implements the various handlers. Each handler is passed two arguments.

A client request with the following properties:

  • uri: current URI in a request, read-only
  • method: request method, read-only
  • httpVersion: HTTP version, read-only
  • remoteAddress: client address, read-only
  • headers{}: request headers object, read-only
  • args{}: request arguments object, read-only
  • variables{}: nginx variables object, read-only
  • log(string): function for writing a string to the error log

A client response with the following properties:

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Nginx: From Beginner to Pro

Nginx: From Beginner to Pro

Rahul Soni
Nginx Essentials

Nginx Essentials

Valery Kholodkov, Valery I Kholodkov
SSH, The Secure Shell: The Definitive Guide, 2nd Edition

SSH, The Secure Shell: The Definitive Guide, 2nd Edition

Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes

Publisher Resources

ISBN: 9781788623551Other