I'm trying to upgrade nginx from 1.14 to 1.18. Currently we use the passenger 6.0.5 with nginx 1.14.

What I'm doing is starting new Ubuntu 18.04 instances. For some reason, the lastest nginx version is 1.14, so I added a updated source list and installed nginx 1.18:

# added deb http://nginx.org/packages/ubuntu bionic nginx
$ sudo apt update
$ sudo apt install nginx
$ ngnix -v
nginx version: nginx/1.18.0

After that I followed the passenger docs: https://www.phusionpassenger.com/library/install/nginx/install/oss/bionic/

sudo apt-get install -y dirmngr gnupg
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
sudo apt-get install -y apt-transport-https ca-certificates

sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bionic main > /etc/apt/sources.list.d/passenger.list'
sudo apt-get update

sudo apt install libnginx-mod-http-passenger

And got the message:

The following packages will be REMOVED:
The following NEW packages will be installed:
  libnginx-mod-http-passenger nginx-common

i.e., it removed the nginx. I believe that it happens because the libnginx-mod-http-passenger depends on nginx-common 1.14.

Any idea on how to solve this?

1 Answer 1


I wouldn't use Passenger. Most of us learned long ago that it was a bad idea to embed web apps into the web server, but in the early days of the web we had no other choice. Now we do, since the mid to late 2000s. There are much better ways to deploy apps, and you should consider changing your approach before continuing with passenger.

With the warning out of the way:

The problem here is that the passenger packages you are trying to use were built for the nginx packages shipped with Ubuntu. The upstream packages provided by nginx.org themselves are built quite differently and are not drop-in replacements. (I blame Debian for this, but that's also another discussion for elsewhere...)

If you really want to use passenger with nginx 1.18 on Ubuntu, use 20.04 LTS which includes nginx 1.18, use the nginx packages that come with Ubuntu, and use focal instead of bionic to get passenger packages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .