C4f1151075b447779af31e99d6cf70e2c6eb47ac
By:
newbie

how to update nginx? and should i update it??

December 30, 2014 15k views

Hello,
currently i m on ubuntu 14.04 and my nginx version is 1.4. i can see theres a stable release of nginx which is 1.6.2
my question is should i update to 1.6.2? if yes how? and should i leave it as it is to 1.4

1 comment
2 Answers

You can upgrade your nginx version by using the official nginx stable ppa:

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
  • Can you please address the full question with your reply please.

    Should he upgrade to stable 1.6.2 as its not in trusty update repository?
    Was there a know issue other than 1.4.6 with 14.04 or is this resolved?

  • Nginx 1.6.2 contains many bugfixes and, more importantly, security patches over 1.4.6 so using the latest stable version is always recommended. I personally use the development version which is usually very stable.

  • If I update to the latest stable (1.6.2) or dev (1.7.9) version all sites load fine except wordpress ones and I can't figure out why.

    Is there something that I need to do to make them work?

    I'm stuck with 1.4.6 because of this.

  • Do you get any errors after upgrading nginx? Can you post the last few lines of nginx's error log? Run:

    sudo tail -30 /var/log/nginx/error.log
    
  • I have no output to error.log or access.log after the upgrade. When I access the site I end up with a blank white page.

  • @kamaln7
    when updating my nginx on the 3rd command

    getting this 2 steps

    Configuration file '/etc/nginx/nginx.conf'
     ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
          D     : show the differences between the versions
          Z     : start a shell to examine the situation
     The default action is to keep your current version.
    *** nginx.conf (Y/I/N/O/D/Z) [default=N] ? 
    
    Configuration file '/etc/nginx/sites-available/default'
     ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
          D     : show the differences between the versions
          Z     : start a shell to examine the situation
     The default action is to keep your current version.
    *** default (Y/I/N/O/D/Z) [default=N] ? 
    

    what should i do? i installed wordpress following this tutorial
    https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-nginx-on-ubuntu-14-04

    and my default server block is /etc/nginx/sites-available/wordpress

    so i press "y" for the first one and "n" for the second one. now my site is broken :(
    should i press no for both??

    by Justin Ellingwood
    WordPress is the most popular CMS (content management system) in the world. It can be used to get your site or blog off the ground quickly and it provides a nice interface for adding content and modifying the site's design. In this guide, we'll walk through how to install WordPress on Ubuntu 14.04 with an Nginx web server.
  • i think i made a mistake not to backup my nginx conf. file.
    i can see configuration of my nginx conf file is changed. so how can i backup and restore after update? or should i do it through filezilla?

  • I cant update my site. always gets broken after i upgrade nginx.

    can somebody give me a proper way to upgrade nginx on a running server?

Have another answer? Share your knowledge.