Skip to content

Instantly share code, notes, and snippets.

@krames
Created March 13, 2014 18:56
Show Gist options
  • Select an option

  • Save krames/9534554 to your computer and use it in GitHub Desktop.

Select an option

Save krames/9534554 to your computer and use it in GitHub Desktop.
This script should setup nginix
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates
echo 'deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main' > /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 600 /etc/apt/sources.list.d/passenger.list
sudo apt-get update -y
sudo apt-get -y install nginx-extras passenger
sed -ie 's/# passenger_root/passenger_root/' /etc/nginx/nginx.conf
sed -ie 's/# passenger_ruby/passenger_ruby/' /etc/nginx/nginx.conf
echo "server {
listen 80;
root /var/www/current/public;
passenger_enabled on;
}" > /etc/nginx/sites-enabled/default
/etc/init.d/nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment