NGINX(8)

๐Ÿ’– NGINX โ€” the manual page, bestie edition ๐Ÿ’–

okay so you picked up the NGINX(8) page from the System Manager's Manual and honestly? taste. let's get into it ๐Ÿซถ


โœจ NAME โœจ

nginx โ€” your HTTP and reverse proxy server, plus a mail proxy server. yeah she does both. multi-hyphenate queen ๐Ÿ‘‘


โœจ SYNOPSIS โœจ

nginx [-?hqTtVv] [-c file] [-e file] [-g directives] [-p prefix]
      [-s signal]

โœจ DESCRIPTION โœจ

so, nginx โ€” pronounced โ€œengine xโ€, yes really, that's the whole bit โ€” is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server. she contains multitudes ๐Ÿ’…

and the way she's known?? for high performance, stability, a rich feature set, simple configuration, and low resource consumption. it's giving main character energy with zero drama. iconic, no notes ๐ŸŒˆ

the options are as follows:


โœจ OPTIONS โœจ

  • -?, -h โ€” print help. she'll tell you what's up ๐ŸŽ€
  • -c file โ€” use an alternative configuration file. not feeling the default? pick your own โœจ
  • -e file โ€” use an alternative error log file. and ooh, there's a special value: stderr, which means the standard error output gets used instead ๐Ÿ’œ
  • -g directives โ€” set global configuration directives. peek at โ€œEXAMPLESโ€ below for the details, i got you ๐Ÿซถ
  • -p prefix โ€” set the prefix path. the default value is /usr/share/nginx. periodt.
  • -q โ€” suppress non-error messages during configuration testing. quiet mode, lowkey mysterious ๐Ÿคซ
  • -s signal โ€” send a signal to the master process. the signal argument can be one of: stop, quit, reopen, reload. here's the matching system signals:
    • stop โ†’ SIGTERM
    • quit โ†’ SIGQUIT
    • reopen โ†’ SIGUSR1
    • reload โ†’ SIGHUP
  • -T โ€” same as -t, but additionally dumps configuration files to standard output. she's showing her whole hand, and honestly? obsessed ๐Ÿ“
  • -t โ€” do not run, just test the configuration file. nginx checks the config file syntax and then tries to open files referenced in the configuration file, including binding to configured listen addresses. no commitment, just vibes check ๐Ÿ”
  • -V โ€” print the nginx version, compiler version, and configure script parameters. the full resume ๐Ÿ’…
  • -v โ€” print the nginx version. just the name-drop โœจ

โœจ SIGNALS โœจ

the master process of nginx can handle these signals:

  • SIGINT, SIGTERM โ€” shut down quickly. no warning, just gone ๐Ÿ’€
  • SIGHUP โ€” reload configuration, start the new worker process with a new configuration, and gracefully shut down old worker processes. glow-up reload โœจ
  • SIGQUIT โ€” shut down gracefully. soft launch into the void ๐Ÿฆ‹
  • SIGUSR1 โ€” reopen log files.
  • SIGUSR2 โ€” upgrade the nginx executable on the fly. literally changing mid-air, ate ๐Ÿ”ฅ
  • SIGWINCH โ€” shut down worker processes gracefully.

and look, while there's no need to explicitly control worker processes normally, they support some signals too:

  • SIGTERM โ€” shut down quickly.
  • SIGQUIT โ€” shut down gracefully.
  • SIGUSR1 โ€” reopen log files.

โœจ DEBUGGING LOG โœจ

to enable a debugging log, reconfigure nginx to build with debugging:

./configure --with-debug ...

and then set the debug level of the error_log:

error_log /path/to/log debug;

it's also possible to enable the debugging for a particular IP address:

events {
        debug_connection 127.0.0.1;
}

โœจ ENVIRONMENT โœจ

the NGINX environment variable is used internally by nginx and should not be set directly by the user. hands off, bestie, she handles it herself ๐Ÿ™ˆ


โœจ FILES โœจ

  • /run/nginx.pid โ€” contains the process ID of nginx. the contents of this file are not sensitive, so it can be world-readable. she's an open book ๐ŸŽ€
  • /etc/nginx/nginx.conf โ€” the main configuration file. the blueprint, the moment โญ
  • /var/log/nginx/error.log โ€” error log file.

โœจ EXIT STATUS โœจ

exit status is 0 on success, or 1 if the command fails. that's the whole vibe check ๐Ÿซถ


โœจ 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; worker_processes 2;"

see how clean that is?? chefs kiss ๐Ÿ‘‘ no cap.


โœจ SEE ALSO โœจ

documentation at http://nginx.org/en/docs/.

for questions and technical support, please refer to http://nginx.org/en/support.html.


โœจ HISTORY โœจ

development of nginx started in 2002, with the first public release on October 4, 2004. she's been that girl for literal decades ๐Ÿ’œ


โœจ AUTHORS โœจ

Igor Sysoev <igor@sysoev.ru>.

this manual page was originally written by Sergey A. Osokin <osa@FreeBSD.org.ru> as a result of compiling many nginx documents from all over the world. the way that's such a labor of love ๐Ÿ˜ญ๐Ÿซถ


and that's the whole page, bestie!! this one's from the Debian edition, dated January 21, 2026 โ€” stay iconic, go reload your config, and remember: test with -t before you reload, always ๐Ÿ’–โœจ๐ŸŽ€๐Ÿฆ‹๐ŸŒธ๐Ÿ’…๐ŸŒˆโญ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from