LoginSignup
3
3

More than 5 years have passed since last update.

Ubuntu14.04にnginxとpassengerをインストール

Posted at

sinatraアプリケーションを動作させるためにnginxとpassengerをインストール・設定した際の作業メモです。
基本的にPassengerのユーザーガイドの通りに進めていけば大丈夫でした。
https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#install_on_debian_ubuntu

$sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
$sudo apt-get install apt-transport-https ca-certificates
$sudo vi /etc/apt/sources.list.d/passenger.list

# Ubuntu 14.04
# deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main

$sudo chown root: /etc/apt/sources.list.d/passenger.list
$sudo chmod 600 /etc/apt/sources.list.d/passenger.list
$sudo apt-get update
$sudo apt-get install nginx-extras passenger
$sudo passenger-config --root 
# 上の出力結果をnginx.confに記述
$sudo vi /etc/nginx/nginx.conf

# http {
#   passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
#   passenger_ruby /home/vagrant/.rbenv/shims/ruby;
# }

# シンタックスチェック
$sudo nginx -t
$sudo service nginx start
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3