• 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 » Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2

By Abhishek Ghosh August 22, 2016 5:23 pm Updated on August 22, 2016

Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2

Advertisement

Most webmaster and sysadmins has upgraded their setup to Ubuntu 16.04 LTS now. But Not all has upgraded, some of them wants HTTP/2 on Ubuntu 14.04 LTS. Here Are Steps For Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2 With Troubleshooting Error. Removal of current Nginx not needed.. Nginx Has No Support For this Upgrade. This is not recommended, we can not give whether HTTP/2 will work or not. But this upgrade is on live website without any downtime and avoid white page error while forcing upgrade. We are forcing the upgrade, it is not normal upgrade.

Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2

 

Steps Before Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2 : Changes on Config Files

 

You must take backup of /etc/nginx/nginx.conf and /etc/nginx/sites-enabled/default or /etc/nginx/sites-enabled/ directory (depends on how many vHosts you have, name of the files). You can copy-paste the files as secret gist on GitHub gist for easy work. First, you need some changes on /etc/nginx/sites-enabled/default. Normally we use something like –

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
server {
        listen 443 ssl spdy default;
        listen [::]:443 ssl spdy default;
        root /path/to/webroot;
        index index.php index.html;
        server_name thecustomizewindows.com www.thecustomizewindows.com;
        error_log /var/log/nginx/error.log;
    
        location ~ \.php$ {
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
                           }
}

You need to change include fastcgi_params to include fastcgi.conf, change listen 443 ssl spy default to listen 443 ssl http2 default_server, remove any SPDY related directives like add header for NPN, SPDY compression etc. HTTP/2 has a big blacklist of old and insecure ciphers, so we must avoid them. You should have –

Advertisement

---

Vim
1
ssl_prefer_server_ciphers on;.

Do the changes and save that file.

/etc/nginx/nginx.conf needs uncomments these directives –

Vim
1
2
limit_zone slimits $binary_remote_addr 5m;
limit_conn slimits 5;

Make sure that limit_req_zone looks like this –

Vim
1
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;

Also, change the fastcgi cache path. Save the files.

 

Steps Before Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2 : Changes on Repository Information

 

cd to /etc/apt/sources.list.d/ and do ls to see if any nginx.list present. If present simply delete with rm command. Now edit the /etc/apt/sources.list file to add :

Vim
1
2
deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx

Save it. Thereafter wget wget nginx_signing.key as written here –

So, you’ll run :

Vim
1
2
3
cd ~
wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key

You’ll get OK response. Run –

Vim
1
sudo apt-get update && sudo apt-get upgrade

There will be no change on version of Nginx.

 

Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2

 

Above steps deliberately done as we switching to Nginx’s repo. Now run –

Vim
1
add-apt-repository ppa:nginx/development

You’ll get a whooping big response :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
This PPA contains the latest 'Mainline' Release version of the nginx web server software.  (Formerly known as the "Development Version" of nginx)
 
The following releases of Ubuntu (including in-development releases) are supported in this PPA:
* Precise (12.04)
* Trusty (14.04)
* Xenial (16.04)
* Yakkety (16.10)
 
The following releases of Ubuntu will soon become End of Life, and therefore will receive no more updates beyond 1.11.2:
* Wily (15.10)
 
The following releases of Ubuntu are no longer supported, and have had their packages removed from the PPA:
* Lucid (10.04)
* Maverick (10.10)
* Natty (11.04)
* Oneiric (11.10)
* Quantal (11.10)
* Raring (13.04)
* Saucy (13.10)
* Utopic (14.10)
More info: https://launchpad.net/~nginx/+archive/ubuntu/development
Press [ENTER] to continue or ctrl-c to cancel adding it

You will get prompts like :

Vim
1
2
3
4
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:

After all completed run :

Vim
1
sudo apt-get update && sudo apt-get upgrade

Then replace /etc/nginx/nginx.conf and /etc/nginx/sites-enabled/default with our modified files as written in under Changes on Config Files subheader. Run nginx -t and reboot the server on successful output. After making sure that your website is running, run nginx -V and nginx -v to check the output. You should have ngx_http_v2_module and version will be like nginx/1.11.3 or above.

Now, test with some browser tool or third part web based tool. Browse your website’s non-cached pages to make sure that visitors are not getting white pages.

 

You Broken My Server. Give My Old Ngix Back!

 

Do the opposite changes on Repository Information, remove PPAs by deleting the .list files from /etc/apt/sources.list.d directory and two lines we which we added to /etc/apt/sources.list file. Also run :

Vim
1
sudo add-apt-repository --remove ppa:nginx/development

This won’t uninstall packages but the official repositories. You will fully remove the nginx, reboot, then run normal command to install nginx-extras, use the backup of backup of /etc/nginx/nginx.conf and /etc/nginx/sites-enabled/default. It is difficult because the repo of Official Ubuntu and Nginx are different. apt-get downgrade does not exist but near similar way actually exists.

Tagged With paperuri:(2c557f7d9f36e3865a31bdbd4cdc02e8) , HTTP2

This Article Has Been Shared 238 Times!

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 Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2

  • How to Upload Backup to Dropbox from Cloud Server

    Here is How to Upload Backup to Dropbox from Cloud Server in Case You Want To Keep Your Backup of Files and Database on a Free Cloud Storage.

  • 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.

  • WordPress XML-RPC Attack & Fake PHP5-FPM Error

    WordPress XML-RPC Attack Can Bring DDoS Resulting in Random 502 PHP5-FPM Errors on Nginx Server or Can Make the Database Down. Here is Fix.

  • Linode Cloud Server Review (Taking HP Cloud as Standard)

    We Tested Linode Cloud Server Review Taking HP Cloud Standard. Free RedHat OpenShift is better for testing, OVH is better for cost reduction.

  • Steps to Upgrade Nginx for HTTP/2 Support (Ubuntu, Cloud Server)

    Here the Steps to Upgrade Nginx for HTTP/2 Support on Cloud Server Running Ubuntu OS from Nginx with SPDY. Pros and Cons Has Been Discussed.

Additionally, 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

  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023
  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Upgrading Ubuntu 14.04 to Latest Nginx to Support HTTP2," in The Customize Windows, August 22, 2016, February 3, 2023, https://thecustomizewindows.com/2016/08/upgrading-ubuntu-14-04-latest-nginx-support-http2/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT