WebFaction
Community site: login faq

Is there any guide that will help me install Reviewboard on webfaction?

So far I have given it a try following reviewboard's documentation without success. It seems to be a two part thing:

  • Installing all dependencies and reviewboard itself as python libraries (http://www.reviewboard.org/docs/manual/1.7/admin/installation/linux/), where I think I had no problem at all.

  • Setting up the website itself (http://www.reviewboard.org/docs/manual/1.7/admin/installation/creating-sites/), which is achieved by running a command and passing the web path as parameter. From the Webfaction panel side, you create a 'mod_wsgi 3.4/Python 2.7' application (say 'review') and set a website with its own subdomain (say sub.domain.com). However, a first problem seems to be the fact that since the 'webapps' folder is not writable you have to point to some new subfolder, where this command creates its own 'htdocs' and 'data' folders and configures everything pointing to it. From here on it seems to be an awful job to copy everything from this newly created folder to the app folder created by webfaction panel AND replace all config files with webfaction's default path. After trying this and browsing to the site, I see that nothing is being served.

Would it be easier to just let reviewboard's install untouched and just tell Webfaction to go look and serve that? I have tried to set the httpd.conf to do that, but then I get a 404 error saying "The requested URL /dashboard/ was not found". I don't know where this dashboard path comes from. Maybe I'm close? Any ideas?

asked 15 May '13, 15:46

Nico
335
accept rate: 0%

edited 16 May '13, 07:37


You don't need to copy anything from the directories created by the RB site installation process. You just need to configure your Apache to use it in-place.

Here's how I'd install Reviewboard:

First, create a PostgreSQL database and user.

Next, create a mod_wsgi 3.4/Python 2.7 application and attach it to a site. The remaining steps assume the app is named "rb" and the site is served from "domain.com".

Next, SSH into your server and run the following commands:

cd ~/webapps/rb
mkdir -p bin lib/python2.7 tmp/rb_cache
PYTHONPATH=$PWD/lib/python2.7 easy_install-2.7 -s $PWD/bin -d $PWD/lib/python2.7 ReviewBoard
./bin/rb-site install $PWD/domain.com

Answer the questions as appropriate.

Next, configure your apache2 instance to serve the RB site you just created. Here's what my apache2/conf/httpd.conf looks like:

ServerRoot "/home/username/webapps/rb/apache2"

LoadModule dir_module        modules/mod_dir.so
LoadModule env_module        modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module       modules/mod_mime.so
LoadModule rewrite_module    modules/mod_rewrite.so
LoadModule setenvif_module   modules/mod_setenvif.so
LoadModule wsgi_module       modules/mod_wsgi.so

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/username/logs/user/access_rb.log combined
DirectoryIndex index.py
DocumentRoot /home/username/webapps/rb/username.webfactional.com/htdocs
ErrorDocument 500 /errordocs/500.html
ErrorLog /home/username/logs/user/error_rb.log
KeepAlive Off
Listen 12345
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIDaemonProcess rb processes=5 python-path=/home/username/webapps/rb/lib/python2.7 threads=1
WSGIProcessGroup rb
WSGIRestrictEmbedded On
WSGILazyInitialization On
WSGIPassAuthorization On
WSGIScriptAlias / /home/username/webapps/rb/domain.com/htdocs/reviewboard.wsgi

The RB-specific bits are DocumentRoot, ErrorDocument, WSGIPassAuthorization, and WSGIScriptAlias. Leave everything else as it is.

Restart your Apache after you've modified the httpd.conf.

Finally, create "Symbolic link to static-only" apps for your RB site static, media, and errordocs directories and attach those to your site in the control panel. Following my example, the URL paths and directories would be:

  • Symlink to /home/username/webapps/rb/domain.com/htdocs/media served on /media
  • Symlink to /home/username/webapps/rb/domain.com/htdocs/static served on /static
  • Symlink to /home/username/webapps/rb/domain.com/htdocs/errordocs served on /errordocs

Wait a few minutes after attaching the symlink apps to the site, and you're done.

Hope that helps!

permanent link

answered 16 May '13, 12:25

seanf
12.2k42136
accept rate: 37%

edited 16 May '13, 12:29

As a new user, I can't upvote (which is astounding to me). But I can leave a comment: thank you! This is really helpful.

(30 May '13, 23:42) DS1
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×111
×2

question asked: 15 May '13, 15:46

question was seen: 4,824 times

last updated: 30 May '13, 23:42

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM