Skip to content

Instantly share code, notes, and snippets.

@leemason
Last active April 18, 2016 16:58
Show Gist options
  • Save leemason/f710e192f55d10e711699b15c549c07d to your computer and use it in GitHub Desktop.
Save leemason/f710e192f55d10e711699b15c549c07d to your computer and use it in GitHub Desktop.
Ubuntu 14 Nginx 1.4 > 1.9 Upgrade
//stop nginx
sudo service nginx stop
//backup config
sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup
//add apt repo
sudo add-apt-repository ppa:nginx/development && sudo apt-get update
//remove then upgrade nginx - choose N to prevent config overwrite (even though we made a backup)
sudo apt-get remove nginx nginx-common && sudo apt-get install nginx
//restart and reload
sudo service nginx restart && sudo service nginx reload
//add http2 support by simply changing
listen 443 ssl;
//to
listen 433 ssl http2;
//in all your sites server blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment