I'm administrating an Ubuntu 14 server. When I type nginx -v
in bash, I get nginx version: nginx/1.4.6 (Ubuntu)
. According to nginx.org, the latest stable version appears to be 1.13.9, not 1.4.6. However, when I run sudo apt-get install --only-upgrade nginx
, I get the response "most recent version is already installed". From this, I understand that the version number I get from nginx -v
is not completely unambiguous. What does the version number mean?

- 255
- 1
- 2
- 8
2 Answers
Ubuntu's packages do not go at the same pace as origin software version.
The latest supported version of nginx for Ubuntu 14.04 by Canonical is the version you see from the output of the nginx -v
command, which is 1.4.6 in this case. Ubuntu's own packages go through Canonical's own testing and integration processes, and they select particular versions they want to support with their OS.
Also, Ubuntu 14 is not the newest Ubuntu distribution available, the 16.04 version most likely has a newer version of nginx available.
There might be unofficial packages of newer nginx versions available for Ubuntu, you can search for those on the Internet.

- 36,796
- 3
- 41
- 63
-
2https://nginx.org/en/linux_packages.html#stable is probably the best option if straying from the Ubuntu packages (official packages from upstream) – Håkan Lindqvist Mar 04 '18 at 23:36
-
A follow up: Is there any easy way to check my nginx 1.4.6 for published vulnerabilities? With so many versions and packages of nginx running around, I'm not sure what I'm reading. https://www.cvedetails.com/vulnerability-list/vendor_id-10048/Nginx.html – Magnus Mar 06 '18 at 12:04
-
1One can check the changelog of the Ubuntu nginx package, which contains information on the issues they have fixed. Typically vulnerabilities are patched provided that the distribution is still supported. – Tero Kilkanen Mar 06 '18 at 18:08
As already mentioned by Tero Kilkanen the Nginx package in Ubuntu is not up-to-date. BTW this is not a specific Nginx issue on Ubuntu. This is the case for many packages.
However, for the fastest way to get a Nginx stable package into your Ubuntu, use the ppa:nginx. It's maintained by the Nginx team.
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:nginx/stable
sudo apt-get update
sudo apt-get install -y nginx

- 6,503
- 2
- 17
- 13