Mastering Nginx

(Ron) #1
Chapter 1

[ 13 ]

Option Explanation
--without-mail_pop3_module When enabling the mail module, the POP3
module may be disabled separately.
--without-mail_imap_module When enabling the mail module, the IMAP
module may be disabled separately.
--without-mail_smtp_module When enabling the mail module, the SMTP
module may be disabled separately.
--without-http This option will completely disable the
http module; use it if you know you only
want to compile in mail support.

For a typical mail proxy, I would recommend configuring NGINX as follows:


$ ./configure --with-mail --with-mail_ssl_module --with-openssl=$
{BUILD_DIR}/openssl-1.0.1c


SSL/TLS is needed nowadays on almost every mail installation and not having it


enabled on a mail proxy robs users of expected functionality. I've recommended


compiling OpenSSL statically so that there are no dependencies on the operating
system's OpenSSL library. The BUILD_DIR variable referenced in the preceding


command would of course have to be set beforehand.


Configure the options to specify paths


The following table shows what configuration options are available to the http module,
from activating the Perl module to specifying the location of temporary directories:


Table: HTTP configure options

Option Explanation
--without-http-cache When using the upstream module, NGINX
can be configured to cache the contents
locally. This option disables that cache.
--with-http_perl_module NGINX configuration can be extended by
using Perl code. This option activates that
module. (Use of this module, however,
degrades performance.)
--with-perl_modules_
path=<path>

This option specifies the path to additional
Perl modules needed for using the
embedded Perl interpreter. It may also be
specified as a configuration option.
--with-perl=<path> The path to Perl (Version 5.6.1 and higher),
if not found on the default path.
Free download pdf