Installing nginx 1.9.7 on Ubuntu 15.04 / 15.10
The install process is very simple with only one minor gotcha.
First off, add the apt keys:
wget http://nginx.org/packages/keys/nginx_signing.key<br /> cat nginx_signing.key | sudo apt-key add -
Next add the following lines to /etc/apt/sources.list if you’re on 15.04:
deb http://nginx.org/packages/mainline/ubuntu/ vivid nginx<br /> deb-src http://nginx.org/packages/mainline/ubuntu/ vivid nginx
Or the following if you’re on 15.10:
deb http://nginx.org/packages/mainline/ubuntu/ wily nginx<br /> deb-src http://nginx.org/packages/mainline/ubuntu/ wily nginx
apt-get purge nginx nginx-core nginx-common
apt-get install nginx
That’s it! If you get something like the below, go back and purge your nginx (or uninstall it if you compiled it manually), since you probably already had it installed. That’s the entirety of the gotcha’s.
Errors were encountered while processing:<br /> /var/cache/apt/archives/nginx_1.9.7-1~vivid_amd64.deb<br /> E: Sub-process /usr/bin/dpkg returned an error code (1)
As of version 1.9.5, nginx supports full http/2 spec. So with a few minutes of learning the config (it really is easy), you can not only use the latest it web standards, its EXTREMELY performant. Enjoy your new LXMN stack (that’s not nearly as cool as ‘LAMP’ but you can’t win every time)!