My Experiences Upgrading Ubuntu 15.10 to Ubuntu 16.04

Published April 22nd, 2016 at 1:09 PM. by Joe Prochazka

The following documents my experiences upgrading existing Ubuntu 15.10 installations to Ubuntu 16.04 LTS. Any issues or differences I may experience I plan to document here. This being said more information may be added to this article as my time dealing with the upgrades contiune.

Nginx, PHP, and MySQL

Both Nginx and PHP have been upgraded in this release and some attention needs to paid to these changes if you are running a web server using both of these applications. The Ubuntu 16.04 LTS Xenial Xerus Release Notes makes note of the changes but not whats involved with fixing things after the upgrade process has completed. The main issue you will run into pertains to the fact PHP has been upgraded to PHP 7.0 so in Ubuntu 16.04 LTS the php5-fpm package is no longer available. The release notes link to an article on which does explain the problem but the fixes, at least at the time of writing this were not complete and wrong. However they did point me in the right direction. After upgrading to Xenial Xerus php5-fpm and php5-mysql were not upgraded. Instead these packages were removed from the system. This was easily remedied by installing the new packages using apt.

sudo apt-get install php7.0-fpm php7.0-mysql

Next as stated in the article changes needed to be made to the existing Nginx site configuration files. The changes pertain to the fastcgi_pass setting which tells Nginx where to pass all PHP processing requests. Instead of pointing to /var/run/php5-fpm.sock it needs to now point to /var/run/php/php7.0-fpm.sock The example given in the article had the path to php7.0-fpm.sock wrong. Below is a modified version of the example given in the article showing where this path should be changed in the default configuration. This should give you an idea of what needs modified in other site configurations as well.

location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        # With php7.0-cgi alone:
        # With php7.0-fpm:
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

After installing the above packages and making the necessary adjustment to the fastcgi_pass setting restart Nginx and you should be good to go.

Enabling HTTP/2 In Nginx

HTTP/2 is now enabled in the Ubuntu 16.04 LTS Xenial Xerus Nginx packages. To enable support for HTTP/2 your site(s) will need to be configured to handle HTTPS requests. If they configured to do so the change to enable HTTP/2 is quite minor and only requires the addition of http2 to the port 443 listen line in your configuration(s).

listen 443 ssl http2;

After reloading/restarting Nginx data requested by newer browsers capable of supporting HTTP/2 will have the content delivered using HTTP/2. Older browsers which do not support this will still receive data over HTTPS.

AdWords Ad