#Possibly easier but untested method: wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add - #Now open ` /etc/apt/sources.list ` and add following repositories at the end deb http://nginx.org/packages/ubuntu/ trusty nginx deb-src http://nginx.org/packages/ubuntu/ trusty nginx ## Tested method to install the latest version of nginx ## #Install the PCRE library needed by nginx sudo apt-get install libpcre3 libpcre3-dev #Replace by the latest version number found on http://nginx.org/ wget http://nginx.org/download/nginx-1.7.4.tar.gz tar -xvf nginx-1.7.4.tar.gz cd nginx-1.7.4 #These flags make sure to put nginx somewhere that is usuall in PATH and to activate the https module ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module make sudo make install # Download nginx startup script wget -O init-deb.sh http://library.linode.com/assets/660-init-deb.sh # Move the script to the init.d directory & make executable sudo mv init-deb.sh /etc/init.d/nginx sudo chmod +x /etc/init.d/nginx # Add nginx to the system startup sudo /usr/sbin/update-rc.d -f nginx defaults ## Make sure to add the nginx.conf into /etc/init/nginx.conf #This will make sure you get the following commands #sudo service nginx start #sudo service nginx stop #sudo service nginx restart #sudo service nginx status