=encoding utf-8 =head1 Name configure - Building nginx from Sources =head1 The build is configured using the C command. It defines various aspects of the system, including the methods nginx is allowed to use for connection processing. At the end it creates a F. The C command supports the following parameters: =over =item C<--help> prints a help message. =back =over =item C<--prefix=I>> defines a directory that will keep server files. This same directory will also be used for all relative paths set by C (except for paths to libraries sources) and in the F configuration file. It is set to the FusrElocalEnginx> directory by default. =item C<--sbin-path=I>> sets the name of an nginx executable file. This name is used only during installation. By default the file is named F>EsbinEnginx>. =item C<--modules-path=I>> defines a directory where nginx dynamic modules will be installed. By default the F>Emodules> directory is used. =item C<--conf-path=I>> sets the name of an F configuration file. If needs be, nginx can always be started with a different configuration file, by specifying it in the command-line parameter C<-c I>>. By default the file is named F>EconfEnginx.conf>. =item C<--error-log-path=I>> sets the name of the primary error, warnings, and diagnostic file. After installation, the file name can always be changed in the F configuration file using the L directive. By default the file is named F>ElogsEerror.log>. =item C<--pid-path=I>> sets the name of an F file that will store the process ID of the main process. After installation, the file name can always be changed in the F configuration file using the L directive. By default the file is named F>ElogsEnginx.pid>. =item C<--lock-path=I>> sets a prefix for the names of lock files. After installation, the value can always be changed in the F configuration file using the L directive. By default the value is F>ElogsEnginx.lock>. =back =over =item C<--user=I>> sets the name of an unprivileged user whose credentials will be used by worker processes. After installation, the name can always be changed in the F configuration file using the L directive. The default user name is nobody. =item C<--group=I>> sets the name of a group whose credentials will be used by worker processes. After installation, the name can always be changed in the F configuration file using the L directive. By default, a group name is set to the name of an unprivileged user. =back =over =item C<--build=I>> sets an optional nginx build name. =item C<--builddir=I>> sets a build directory. =back =over =item C<--with-select_module> C<--without-select_module> enables or disables building a module that allows the server to work with the C needs to be increased it can also be specified here such as this: C<--with-cc-opt="-D FD_SETSIZE=2048">. =item C<--with-ld-opt=I>> sets additional parameters that will be used during linking. When using the system PCRE library under FreeBSD, C<--with-ld-opt="-L EusrElocalElib"> should be specified. =item C<--with-cpu-opt=I>> enables building per specified CPU: C, C, C, C, C, C, C, C, C. =back =over =item C<--without-pcre> disables the usage of the PCRE library. =item C<--with-pcre> forces the usage of the PCRE library. =item C<--with-pcre=I>> sets the path to the sources of the PCRE library. The library distribution needs to be downloaded from the L site and extracted. The rest is done by nginx’s C<.Econfigure> and C. The library is required for regular expressions support in the L directive and for the L module. =item C<--with-pcre-opt=I>> sets additional build options for PCRE. =item C<--with-pcre-jit> builds the PCRE library with “just-in-time compilation” support (1.1.12, the L directive). =item C<--without-pcre2> disables use of the PCRE2 library instead of the original PCRE library (1.21.5). =back =over =item C<--with-zlib=I>> sets the path to the sources of the zlib library. The library distribution needs to be downloaded from the L site and extracted. The rest is done by nginx’s C<.Econfigure> and C. The library is required for the L module. =item C<--with-zlib-opt=I>> sets additional build options for zlib. =item C<--with-zlib-asm=I>> enables the use of the zlib assembler sources optimized for one of the specified CPUs: C, C. =back =over =item C<--with-libatomic> forces the libatomic_ops library usage. =item C<--with-libatomic=I>> sets the path to the libatomic_ops library sources. =back =over =item C<--with-openssl=I>> sets the path to the OpenSSL library sources. =item C<--with-openssl-opt=I>> sets additional build options for OpenSSL. =back =over =item C<--with-debug> enables the L. =back Example of parameters usage (all of this needs to be typed in one line): ./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=../pcre2-10.39 --with-zlib=../zlib-1.3 After configuration, nginx is compiled and installed using C.