O'Reilly logo

Mastering NGINX by Dimitri Aivaliotis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Putting it all together

Now that you have gotten a glimpse at what all the various configuration options are for, you can design a binary that precisely fits your needs. The following example specifies the prefix, user, group, certain paths, disables some modules, enables some others, and includes a couple of third-party modules:

$ export BUILD_DIR=`pwd` $ export NGINX_INSTALLDIR=/opt/nginx $ export VAR_DIR=/home/www/tmp $ export LUAJIT_LIB=/opt/luajit/lib $ export LUAJIT_INC=/opt/luajit/include/luajit-2.0 $ ./configure \ --prefix=${NGINX_INSTALLDIR} \ --user=www \ --group=www \ --http-client-body-temp-path=${VAR_DIR}/client_body_temp \ --http-proxy-temp-path=${VAR_DIR}/proxy_temp \ --http-fastcgi-temp-path=${VAR_DIR}/fastcgi_temp \ --without-http_uwsgi_module ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required