Skip to content

Instantly share code, notes, and snippets.

@huyphan
Created August 22, 2014 05:04
Show Gist options
  • Save huyphan/9609bd1ead8b5c64a6ae to your computer and use it in GitHub Desktop.
Save huyphan/9609bd1ead8b5c64a6ae to your computer and use it in GitHub Desktop.
Reviewboard + Nginx + UWSGI
# NGINX CONFIGURATION
upstream reviewboard_uwsgi {
server localhost:8005;
}
server {
....
location /reviews/media {
alias /var/www/review-board/htdocs/media;
}
location /reviews/static {
alias /var/www/review-board/htdocs/static;
}
location /reviews/errordocs {
alias /var/www/review-board/htdocs/errordocs;
}
location /reviews {
include uwsgi_params;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param Host $http_host;
uwsgi_pass reviewboard_uwsgi;
}
....
}
# UWSGI startup script:
$ uwsgi --http-socket 0.0.0.0:8005 --processes 2 --harakiri 60 --master --post-buffering 4096 --wsgi-file /var/www/review-board/htdocs/reviewboard.wsgi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment