Skip to content

Instantly share code, notes, and snippets.

@mattjmorrison
Created December 3, 2012 13:17
Show Gist options
  • Save mattjmorrison/4194993 to your computer and use it in GitHub Desktop.
Save mattjmorrison/4194993 to your computer and use it in GitHub Desktop.
nginx config
server {
listen 80;
}
server {
listen 80;
server_name python.sample.com;
location / {
auth_basic "Restricted";
auth_basic_user_file htpasswd;
proxy_pass http://localhost:8000;
}
access_log /var/log/nginx/guni-access.log;
error_log /var/log/nginx/guni-error.log info;
}
server {
server_name ruby.sample.com;
location / {
auth_basic "Restricted";
auth_basic_user_file htpasswd;
proxy_pass http://localhost:8808;
}
access_log /var/log/nginx/guni-access.log;
error_log /var/log/nginx/guni-error.log info;
}
apt-get update
apt-get install apache2-utils nginx git python-virtualenv curl couchdb -y
htpasswd -bc /etc/nginx/htpasswd asdf asdf
# seutp ruby gem server
curl -L https://get.rvm.io | bash -s stable --ruby
rvm gemset create gemserver
# need to gem install the versions into this gemset that should be served
rvm use 1.9.3@gemserver
gem server --daemon
# setup python egg server
virtualenv virtualenv
. virtualenv/bin/activate
pip install gunicorn==0.14.6 pypiserver==0.6.0 passlib
# need to put tarballs of eggs in /root/eggs to be served
mkdir eggs
gunicorn 'pypiserver:app("/root/eggs/",None,None,"/etc/nginx/htpasswd")' --daemon
# setup npm repository
npm install -g couchapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment