NGINX · Schema

Ngx

The ngx global object (since 0.5.0). Provides NGINX runtime information and the fetch() method.

API GatewayCachingCloud-NativeLoad BalancerOpen-SourceReverse ProxyWeb Server

Properties

Name Type Description
build string Optional NGINX build name (since 0.8.0).
conf_file_path string File path to the current NGINX configuration file (since 0.8.0).
conf_prefix string NGINX configuration prefix directory (since 0.7.8).
error_log_path string File path to the current error log file (since 0.8.0).
prefix string NGINX installation prefix.
version string NGINX version string.
version_number integer NGINX version as a number.
worker_id integer Current worker process ID.
View JSON Schema on GitHub

JSON Schema

njs-ngx-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nginx/refs/heads/main/json-schema/njs-ngx-schema.json",
  "title": "Ngx",
  "description": "The ngx global object (since 0.5.0). Provides NGINX runtime information and the fetch() method.",
  "type": "object",
  "properties": {
    "build": {
      "type": "string",
      "readOnly": true,
      "description": "Optional NGINX build name (since 0.8.0).",
      "example": "nginx-plus-r32"
    },
    "conf_file_path": {
      "type": "string",
      "readOnly": true,
      "description": "File path to the current NGINX configuration file (since 0.8.0).",
      "example": "/etc/nginx/nginx.conf"
    },
    "conf_prefix": {
      "type": "string",
      "readOnly": true,
      "description": "NGINX configuration prefix directory (since 0.7.8).",
      "example": "/etc/nginx/"
    },
    "error_log_path": {
      "type": "string",
      "readOnly": true,
      "description": "File path to the current error log file (since 0.8.0).",
      "example": "/var/log/nginx/error.log"
    },
    "prefix": {
      "type": "string",
      "readOnly": true,
      "description": "NGINX installation prefix.",
      "example": "/usr/local/nginx"
    },
    "version": {
      "type": "string",
      "readOnly": true,
      "description": "NGINX version string.",
      "example": "1.25.3"
    },
    "version_number": {
      "type": "integer",
      "readOnly": true,
      "description": "NGINX version as a number.",
      "example": 1025003
    },
    "worker_id": {
      "type": "integer",
      "readOnly": true,
      "description": "Current worker process ID.",
      "example": 0
    }
  }
}