{
    "mode": "man",
    "parameter": "nginx",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/nginx/8/json",
    "generated": "2026-05-30T07:08:21Z",
    "synopsis": "nginx [-?hqTtVv] [-c file] [-g directives] [-p prefix] [-s signal]",
    "sections": {
        "NAME": {
            "content": "nginx — HTTP and reverse proxy server, mail proxy server\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "nginx [-?hqTtVv] [-c file] [-g directives] [-p prefix] [-s signal]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "nginx (pronounced “engine x”) is an HTTP and reverse proxy server, a mail proxy server, and a\ngeneric TCP/UDP proxy server.  It is known for its high performance, stability, rich feature\nset, simple configuration, and low resource consumption.\n\nThe options are as follows:\n\n-?, -h         Print help.\n",
            "subsections": [
                {
                    "name": "-c",
                    "content": "",
                    "flag": "-c"
                },
                {
                    "name": "-g",
                    "content": "",
                    "flag": "-g"
                },
                {
                    "name": "-p",
                    "content": "",
                    "flag": "-p"
                },
                {
                    "name": "-q",
                    "content": "",
                    "flag": "-q"
                },
                {
                    "name": "-s",
                    "content": "quit, reopen, reload.  The following table shows the corresponding system sig‐\nnals:\n\nstop    SIGTERM\nquit    SIGQUIT\nreopen  SIGUSR1\nreload  SIGHUP\n",
                    "flag": "-s"
                },
                {
                    "name": "-T -t",
                    "content": "",
                    "flag": "-t"
                },
                {
                    "name": "-t",
                    "content": "file syntax and then tries to open files referenced in the configuration file.\n",
                    "flag": "-t"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                }
            ]
        },
        "SIGNALS": {
            "content": "The master process of nginx can handle the following signals:\n\nSIGINT, SIGTERM  Shut down quickly.\nSIGHUP           Reload configuration, start the new worker process with a new configuration,\nand gracefully shut down old worker processes.\nSIGQUIT          Shut down gracefully.\nSIGUSR1          Reopen log files.\nSIGUSR2          Upgrade the nginx executable on the fly.\nSIGWINCH         Shut down worker processes gracefully.\n\nWhile there is no need to explicitly control worker processes normally, they support some sig‐\nnals too:\n\nSIGTERM          Shut down quickly.\nSIGQUIT          Shut down gracefully.\nSIGUSR1          Reopen log files.\n",
            "subsections": []
        },
        "DEBUGGING LOG": {
            "content": "To enable a debugging log, reconfigure nginx to build with debugging:\n\n./configure --with-debug ...\n\nand then set the debug level of the errorlog:\n\nerrorlog /path/to/log debug;\n\nIt is also possible to enable the debugging for a particular IP address:\n\nevents {\ndebugconnection 127.0.0.1;\n}\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "The NGINX environment variable is used internally by nginx and should not be set directly by\nthe user.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/run/nginx.pid\nContains the process ID of nginx.  The contents of this file are not sensitive, so it\ncan be world-readable.\n\n/etc/nginx/nginx.conf\nThe main configuration file.\n\n/var/log/nginx/error.log\nError log file.\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "Exit status is 0 on success, or 1 if the command fails.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "Test configuration file ~/mynginx.conf with global directives for PID and quantity of worker\nprocesses:\n\nnginx -t -c ~/mynginx.conf \\\n-g \"pid /var/run/mynginx.pid; workerprocesses 2;\"\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Documentation at http://nginx.org/en/docs/.\n\nFor questions and technical support, please refer to http://nginx.org/en/support.html.\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "Development of nginx started in 2002, with the first public release on October 4, 2004.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Igor Sysoev <igor@sysoev.ru>.\n\nThis manual page was originally written by Sergey A. Osokin <osa@FreeBSD.org.ru> as a result of\ncompiling many nginx documents from all over the world.\n\nBSD                            December 5, 2019                            BSD",
            "subsections": []
        }
    },
    "summary": "nginx — HTTP and reverse proxy server, mail proxy server",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-g",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "quit, reopen, reload. The following table shows the corresponding system sig‐ nals: stop SIGTERM quit SIGQUIT reopen SIGUSR1 reload SIGHUP"
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "file syntax and then tries to open files referenced in the configuration file."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [
        "Test configuration file ~/mynginx.conf with global directives for PID and quantity of worker",
        "processes:",
        "nginx -t -c ~/mynginx.conf \\",
        "-g \"pid /var/run/mynginx.pid; workerprocesses 2;\""
    ],
    "see_also": []
}