Skip to content

Instantly share code, notes, and snippets.

View portertech's full-sized avatar

Sean Porter portertech

View GitHub Profile
cd /etc
sudo wget http://dl.dropbox.com/u/2975681/unicorn.conf
sudo wget http://dl.dropbox.com/u/2975681/god.conf
cd /etc/nginx
sudo mv nginx.conf nginx.conf.old
sudo wget http://dl.dropbox.com/u/2975681/nginx.conf
sudo nano /etc/nginx/nginx.conf
events {
worker_connections 1024; # increase if you have lots of clients
accept_mutex off; # "on" if nginx worker_processes > 1
# use epoll; # enable for Linux 2.6+
# use kqueue; # enable for FreeBSD, OSX
}
# listen 80 default deferred; # for Linux
# listen 80 default accept_filter=httpready; # for FreeBSD
listen 80 default;
# path for static files
root /path/to/your/application/current/public;
# Rails error pages
location = /500.html {
root /path/to/your/application/current/public;
}
sudo nano /etc/unicorn.conf
# Help ensure your application will always spawn in the symlinked "current" directory that Capistrano sets up
working_directory "/path/to/your/application/current"
# Unicorn master is started as root, which is fine, but let's
# drop the workers to your user/group
begin
uid, gid = Process.euid, Process.egid
user, group = 'your_user_name', 'you_group_name'
sudo nano /etc/god.conf