Skip to content

Instantly share code, notes, and snippets.

@evenchange4
Forked from simonw/gist:92481
Last active September 2, 2019 04:19
Show Gist options
  • Save evenchange4/e04ad27f329272238b556a491139b812 to your computer and use it in GitHub Desktop.
Save evenchange4/e04ad27f329272238b556a491139b812 to your computer and use it in GitHub Desktop.
Compile nginx standalone without root access
# Compile nginx standalone without root access
mkdir ~/installed
mkdir ~/installed/nginx
mkdir ~/src
cd ~/src
# PCRE dependency - we'll compile against this statically
wget http://kent.dl.sourceforge.net/sourceforge/pcre/pcre-8.42.tar.gz
tar -xzvf pcre-8.42.tar.gz
# Grab nginx
wget http://sysoev.ru/nginx/nginx-1.16.1.tar.gz
tar -xzvf nginx-1.16.1.tar.gz
# Compile it
cd nginx-1.16.1
./configure --prefix=/home/simon/installed/nginx --with-pcre=/home/simon/src/pcre-8.42
make
make install
# Edit config to not bind to port 80 (as we aren't root)
vi ~/installed/nginx/conf/nginx.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment