Skip to content

Instantly share code, notes, and snippets.

@jokeru
Created June 27, 2014 19:36
Show Gist options
  • Save jokeru/01ad15c3d83f76fca81a to your computer and use it in GitHub Desktop.
Save jokeru/01ad15c3d83f76fca81a to your computer and use it in GitHub Desktop.
howto compile nginx for static content only - minimal modules loaded
apt-get install build-essential
cd /usr/src/
wget http://nginx.org/download/nginx-1.6.0.tar.gz
tar -xzf nginx-1.6.0.tar.gz
cd nginx-1.6.0/
./configure --help
./configure \
--prefix=/usr/local/nginx \
--sbin-path=/usr/local/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
\
--user=www-data \
--group=www-data \
\
--with-http_stub_status_module \
--without-http_charset_module \
--without-http_gzip_module \
--without-http_ssi_module \
--without-http_userid_module \
--without-http_access_module \
--without-http_auth_basic_module \
--without-http_autoindex_module \
--without-http_geo_module \
--without-http_map_module \
--without-http_split_clients_module \
--without-http_referer_module \
--without-http_rewrite_module \
--without-http_proxy_module \
--without-http_fastcgi_module \
--without-http_uwsgi_module \
--without-http_scgi_module \
--without-http_memcached_module \
--without-http_limit_conn_module \
--without-http_limit_req_module \
--without-http_empty_gif_module \
--without-http_browser_module \
--without-http_upstream_ip_hash_module \
--without-http_upstream_least_conn_module \
--without-http_upstream_keepalive_module \
\
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/lib/nginx/body \
\
--without-pcre \
\
--with-debug
make
make install
@voondo
Copy link

voondo commented Feb 5, 2016

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment