Mastering Nginx

(Ron) #1

Installing NGINX and Third-Party Modules


[ 12 ]

You are also able to compile with optimizations that you may not get in a packaged


installation. This is where the following options can be especially useful:


Table: Configure options for optimization

Option Explanation
--with-cc=<path> If you would like to set a C compiler that
is not in your default PATH.
--with-cpp=<path> This is the corresponding path to the
C preprocessor.
--with-cc-opt=<options> Here is where the path to the necessary include
files may be indicated (-I<path>), as well as
optimizations (-O4) and specifying a 64-bit build.
--with-ld-opt=<options> The options to the linker include library path
(-L<path>) and run path (-R<path>).
--with-cpu-opt=<cpu> A build specific to a particular CPU family may be
specified with this option.

Configuring for web or mail service


NGINX is unique among high-performing web servers in that it was also designed


to be a mail proxy server. Depending on your goals in building NGINX, you can
configure it for web acceleration, a web server, a mail proxy, or all of them. It may be


beneficial to have one package that you can install on any server in your infrastructure


and be able to set NGINX's role through configuration, or it may serve your needs
better to have a slimmed-down binary to use in high-performance environments


where every extra KB counts.


Configure options for a mail proxy


The following table specifies configuration options that are unique to the mail module:


Table: Mail configure options

Option Explanation
--with-mail This will enable the mail module, which is
not activated by default.
--with-mail_ssl_module In order to proxy any kind of mail
transaction that uses SSL/TLS, this module
will need to be activated.
Free download pdf