Skip to content

Instantly share code, notes, and snippets.

@schwartzie
Created November 6, 2013 23:02
Show Gist options
  • Save schwartzie/7345786 to your computer and use it in GitHub Desktop.
Save schwartzie/7345786 to your computer and use it in GitHub Desktop.
Configuration to deploy ReviewBoard (http://www.reviewboard.org/) via Nginx, uWSGI, and supervisord on Debian Squeeze. Nginx with WSGI support installed using nginx-full package from Dotdeb (http://www.dotdeb.org/). uWSGI installed using pip ("pip install uwsgi") as described in http://uwsgi-docs.readthedocs.org/en/latest/Install.html#installing…
# nginx configuration stored in /etc/nginx/sites-available/reviewboard and symlinked in /etc/nginx/sites-enabled
upstream reviewboard_uwsgi {
server localhost:12001;
}
server {
listen 443 ssl;
server_name reviewboard.example.com;
location / {
include uwsgi_params;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param Host $http_host;
uwsgi_pass reviewboard_uwsgi;
}
location /media {
alias /path/to/reviewboard/htdocs/media;
}
location /static {
alias /path/to/reviewboard/htdocs/static;
}
location /errordocs {
alias /path/to/reviewboard/htdocs/errordocs;
}
location /favicon.ico {
alias /path/to/reviewboard/htdocs/static/rb/images/favicon.png;
}
}
# supervisor configuration stored in /etc/supervisor/conf.d/reviewboard.conf
[program:reviewboard]
command = /usr/local/bin/uwsgi -s 127.0.0.1:12001 --processes 2 --harakiri 60 --master --post-buffering 4096 --wsgi-file /path/to/reviewboard/htdocs/reviewboard.wsgi --disable-logging
user = uwsgi
stopsignal = INT
autostart = true
autorestart = true
stderr_logfile = /var/log/supervisor/reviewboard-stderr.log
stdout_logfile = /var/log/supervisor/reviewboard-stdout.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment