Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo nano /etc/apt/sources.list
- Add the following in the file:
- # Nginx upgrades
- deb http://nginx.org/packages/ubuntu/ precise nginx
- deb-src http://nginx.org/packages/ubuntu/ precise nginx
- Now remove the old version on your server:
- sudo apt-get clean
- sudo apt-get remove nginx-*
- Get the signing key
- wget http://nginx.org/packages/keys/nginx_signing.key
- cat nginx_signing.key | sudo apt-key add -
- And install the latest stable release, hit enter for the default which is to keep your nginx.conf and not install a new one.
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install nginx
- This will remove the old version but keep all your config and vhost files intact, install the latest stable release all without a seconds downtime
- Now restart nginx
- sudo service nginx restart
- Enjoy!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement