Mastering Nginx

(Ron) #1
Chapter 1

[ 11 ]

When compiling your own nginx binary, you are much more free to include only


what you need. Can you already say under which user NGINX should run? Do you
want to specify the default logfile locations so that they don't need to be explicitly set


in the configuration? The following table of configure options will help you design
your own binary. These are options that are valid for NGINX independent of which


module is activated.


Table: Common configure options

Option Explanation
--prefix=<path> The root of the installation.
All other installation paths
are relative to this one.
--sbin-path=<path> The path to the nginx binary.
If not specified, this will be
relative to the prefix.
--conf-path=<path> The path to where nginx will look
for its configuration file, if not
specified on the command line.
--error-log-path=<path> This is where nginx will write
its error logfile, unless configured
otherwise.
--pid-path=<path> This is where nginx will write
the pid file of the master process,
usually under /var/run.
--lock-path=<path> The path to the shared memory
mutex lock file.
--user=<user> The user under which the worker
processes should run.
--group=<group> The group under which the worker
processes should run.
--with-file-aio. Enables asynchronous I/O for
FreeBSD 4.3+ and Linux 2.6.22+
--with-debug This option will enable debug
logging. Not recommended for
production systems.
Free download pdf