• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Install Nginx HTTP/2 With ALPN on Ubuntu 14.04 From ondrej/nginx PPA

By Abhishek Ghosh August 23, 2016 11:03 am Updated on August 23, 2016

Install Nginx HTTP/2 With ALPN on Ubuntu 14.04 From ondrej/nginx PPA

Advertisement

In our previous guide, we have shown how to easily upgrade Nginx on Ubuntu 14.04 for HTTP/2 support. The required changes in the /etc/nginx/sites-enabled/default file, /etc/nginx/nginx.conf file and limitations of that way of installation has been discussed on this article. In this guide, we will show how to install Nginx HTTP/2 with ALPN on Ubuntu 14.04 from ondrej/nginx PPA. It simply means, we really do not need to compile Nginx from source, avoid downtime of a live website. However, this way demands a slight more working knowledge, i.e. it is not exactly easy like the Nginx development PPA way. But this Nginx on Ubuntu 14.04 will deliver HTTP/2 with ALPN support.

Install Nginx HTTP:2 With ALPN on Ubuntu 14-04 From ondrej-nginx PPA

 

Needed Preparation To Install Nginx HTTP/2 With ALPN on Ubuntu 14.04 From ondrej/nginx PPA

 

As obvious step, we need to take the back of /etc/nginx/sites-enabled/default file (or /etc/nginx/sites-enabled directory for many virtual hosts), /etc/nginx/nginx.conf file preferably as GitHub secret gist, so that in case our method fails and the these config files get overwritten, we can switch PPA to the old Nginx development and use these config files.

Secondly, if you have added Nginx development PPA or other PPA, you need to remove it. cd to /etc/apt/sources.list.d and run ls :

Advertisement

---

Vim
1
2
cd /etc/apt/sources.list.d
ls

If you notice any list with nginx keyword, remove it/them with rm command. Also check /etc/apt/sources.list file for any added PPA specific to Nginx and remove them if present. Run apt update.

Adding PPAs and Upgrading OpenSSL to Install Nginx on Ubuntu 14.04 For HTTP/2 With ALPN

Basically, commonly we use ondrej/php PPA, that has newest needed OpenSSL. If we add both PPA by Ondřej Surý, we can update OpenSSL. Simply run these commands :

Vim
1
2
3
4
sudo add-apt-repository -y ppa:ondrej/php
sudo add-apt-repository -y ppa:ondrej/nginx
sudo apt-get update
sudo apt-get upgrade openssl

You can remove ppa:ondrej/php later from by cd–ing to /etc/apt/sources.list.d, running ls and deleting any PHP specific list. Otherwise while running sudo apt-get upgrade, your PHP will try to become PHP 7.

 

Install Nginx HTTP/2 With ALPN on Ubuntu 14.04 From ondrej/nginx PPA

 

Now, we need to mock building Nginx, source it to check whether our needed version is getting pulled and install it. If we directly run compiled Nginx, it may again fallback to old version of OpenSSL build. This way will give the room to add any modules as well. If you run apt-get install nginx or apt-get install nginx-extras, OpenSSL version will shows as 1.0.2, but nginx -V will always show that it is built with 2014’s OpenSSL.

Vim
1
2
3
4
5
6
7
sudo apt-get install -y dpkg-dev
sudo mkdir /opt/nginx
cd /opt/nginx
sudo apt-get source nginx
sudo apt-get -y build-dep nginx
cd nginx-1.*
sudo dpkg-buildpackage -b

During running the above commands, you should check the source files. At final step we need to stop our installed, running Nginx, then install our custom version of Nginx on Ubuntu 14.04 for HTTP/2 with ALPN support. Run these commands :

Vim
1
2
3
4
cd /opt/nginx
sudo service nginx stop
sudo dpkg --install nginx_1.*~trusty_amd64.deb
sudo service nginx start

In case the method fails, you need to purge Nginx, use the nginx_1.*~trusty_amd64.deb file to install the Nginx. That is quite unlikely, but still we have /etc/nginx/sites-enabled directory for many virtual hosts), /etc/nginx/nginx.conf file preferably as GitHub secret gist as fail safe measure.

Obviously, you will use the tools like described in the previous guide to check whether Google Chrome and SSL Labs test to really understand that your server has HTTP/2 with ALPN support. You need to troubleshoot in case there is problem. This is official repo of Ondřej Surý :

Vim
1
https://launchpad.net/~ondrej

Kindly consider to motivate him with small donation. Your $10 donation is enough as individual user.

 

Plan for Upgrading to Ubuntu 16.04 LTS

 

As next step of server administration, you should plan to upgrade PHP to PHP 7. You need to adjust some path as like we written before. Now, if you follow all the steps including upgrading to PHP 7, your all softwares, /etc/nginx/sites-enabled/default file, /etc/nginx/nginx.conf file, PHP-FPM files are upgraded and became forward compatible with Ubuntu 16.04 LTS. As it is impractical to run Ubuntu 14.04 LTS forever from security point of view, you should launch a cloud Server/Virtual server instance running Ubuntu 16.04 LTS, follow our guide to create LEMP server on Ubuntu 16.04 LTS, use your settings files from Ubuntu 14.04 LTS production server. This will create a development environment to check whether everything is fine. You can browse by IP on your website on development environment after importing files, database, even temporary change the IP in DNS to test. After making sure that everything works fine, on your main server (which is probably a dedicated server) take the risk for command line upgrade of Ubuntu 14.04 LTS to Ubuntu 16.04 LTS.

We will not publish any further guide on upgrading to Ubuntu 16.04 LTS or any support to Ubuntu 16.04 LTS anymore. As most of us have upgraded our all servers to Ubuntu 16.04 LTS, chance of security flaw will be higher on Ubuntu 14.04. Within end of September 2016, you should have Ubuntu 14.04. You possibly getting option now for using “do-release-upgrade” on Ubuntu 14.04.

Tagged With install ondrej nginx , Install PHP7 On Ubuntu And Nginx
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Install Nginx HTTP/2 With ALPN on Ubuntu 14.04 From ondrej/nginx PPA

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • How to Install WordPress : Ubuntu 16.04, Nginx, PHP7-FPM

    Here is Step by Step Guide on How to Install WordPress on Ubuntu 16.04, Nginx, PHP7-FPM, memcached & Percona MySQL 5.7 on Cloud Server or VPS.

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy