Skip to content

Instantly share code, notes, and snippets.

@weivall
Created September 30, 2015 08:00
Show Gist options
  • Save weivall/94925689cd590513a4a5 to your computer and use it in GitHub Desktop.
Save weivall/94925689cd590513a4a5 to your computer and use it in GitHub Desktop.
Nginx compilation with js module
# Obtain the latest source for NGINX from http://nginx.org/en/download.html
$ wget http://nginx.org/download/nginx-1.9.5.tar.gz
$ tar -xzvf nginx-1.9.5.tar.gz
# Obtain the development sources for nginScript
$ hg clone http://hg.nginx.org/njs
# Build and install NGINX
$ cd nginx-1.9.5
$ ./configure \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--user=www \
--group=www \
--with-ipv6 \
--with-pcre-jit \
--with-http_gzip_static_module \
--with-http_ssl_module \
--with-http_v2_module \
--add-module=../njs/nginx \
\
$ make -j2 && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment