Install the nginx and passenger packages.
# Install our PGP key and add HTTPS support for APT
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates
# Add APT repository (Use trusty for 14.04 or xenial for 16.04)
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main > /etc/apt/sources.list.d/passenger.list'
sudo apt-get update
# Install Passenger + Nginx
sudo apt-get install nginx-full passenger
Next, open your nginx.conf and make sure passenger.conf is loaded in the http block.
If you could not find passenger.conf in the above directory, you could create one and add these 2 lines into the file. Take note of the username in the path.
Finally, you could start the nginx server.
sudo service nginx start