diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-07-18 17:21:53 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-08-21 17:38:18 +0100 |
commit | 61559c07cab586734702be4c74b591227269f959 (patch) | |
tree | dc4f90d622a251d003ee217d6a59b365f1f9b6b3 /docs/installing/manual_install.md | |
parent | 4fcc402212d16916233ba44095b61f96c3a3eae2 (diff) |
Update application server section
- Remove use of `rails server`. It boots thin anyway (as it’s in the
Gemfile) but doesn’t allow all of thin’s options.
- Add more info about thin
- Add notes about installing passenger
Diffstat (limited to 'docs/installing/manual_install.md')
-rw-r--r-- | docs/installing/manual_install.md | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index c84600e6a..c257ffeac 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -369,11 +369,35 @@ you should really try to get this working. changes to the code. </div> -## Run the Server +## Configure the Application Server + +Alaveteli can run under many popular application servers. mySociety recommends +the use of [Phusion Passenger](https://www.phusionpassenger.com) (AKA +mod_rails) or [thin](http://code.macournoyer.com/thin). + +### Using Phusion Passenger + +Passenger is the recommended application server as it is well proven in +production environments. It is implemented as an Apache mod, so it cannot be +run independently. + + apt-get install -y libapache2-mod-passenger + +See later in the guide for configuring the Apache web server with Passenger. + +### Using Thin + +Thin is a lighter-weight application server which can be run independently of +a web server. Run the following to get the server running: - bundle exec rails server --environment=development + cd /var/www/alaveteli + bundle exec thin \ + --environment=production \ + --user=alaveteli \ + --group=alaveteli \ + start By default the server listens on all interfaces. You can restrict it to the localhost interface by adding `--binding=127.0.0.1` @@ -381,6 +405,8 @@ localhost interface by adding `--binding=127.0.0.1` The server should have told you the URL to access in your browser to see the site in action. +You can daemonize the process by starting it with the `--daemonize` option. + ## Cron jobs and init scripts The crontab and init scripts use the `.ugly` file format, which is a strange |