Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks to install docs #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 38 additions & 25 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Fort installation instructions
==============================

Setting up the bugle project
----------------------------

Install Django and mod-wsgi (``libapache2-mod-wsgi`` on Debian).

Checkout ``bugle_project`` into ``/home/bugle`` and run:
Expand All @@ -14,37 +17,15 @@ Create MySQL database ``bugle`` and an SSL certificate:
$ make-ssl-cert generate-default-snakeoil --force-overwrite
$ a2enmod ssl

Create ``/etc/bind/db.twitter.com``:

$TTL 604800
@ IN SOA localhost. root.localhost. (
4 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ; Negative Cache TTL
)

@ IN NS 10.0.0.1
@ IN NS 10.0.0.2
@ IN A 10.0.0.1
api IN A 10.0.0.1

Add to ``/etc/bind/named.conf.local``:

zone "twitter.com." {
type master;
file "/etc/bind/db.twitter.com";
allow-transfer {
forts;
};
};
Configuring apache
------------------

Create ``/etc/apache2/sites-available/bugle``:

<VirtualHost *:80>
ServerName twitter.com
ServerAlias api.twitter.com
#ServerAlias bugle.fort
WSGIPassAuthorization On
WSGIScriptAlias / /home/bugle/bugle_project/bugle.wsgi
ErrorLog /var/log/apache2/bugle-error.log
Expand All @@ -55,6 +36,7 @@ Create ``/etc/apache2/sites-available/bugle``:
<VirtualHost *:443>
ServerName twitter.com
ServerAlias api.twitter.com
#ServerAlias bugle.fort
WSGIPassAuthorization On
WSGIScriptAlias / /home/bugle/bugle_project/bugle.wsgi
ErrorLog /var/log/apache2/bugle-error.log
Expand All @@ -72,3 +54,34 @@ Run:
$ a2ensite bugle
$ /etc/init.d/apache2 force-reload

Note that if you also want bugle to respond to a non-twitter hostname (say, `bugle.fort`), then you'll need to uncomment and edit the additional ServerAlias lines and also ensure that the relevant hostnames are in your local DNS (for instance by using [the configuration files from /dev/fort](http://github.com/devfort/hostsetup)).

Making local clients see bugle instead of twitter
-------------------------------------------------

This is optional, and evil, but may be convenient in some cases; it requires that the machine running bind as a name server for the local network is that same as the machine running bugle. Alternatively, people can edit their machine's `/etc/hosts` or [the equivalent file on Windows](https://secure.wikimedia.org/wikipedia/en/wiki/Hosts_%28file%29) to point to wherever you're running bugle.

Create ``/etc/bind/db.twitter.com``, assuming below that your machine is `10.0.0.1`:

$TTL 604800
@ IN SOA localhost. root.localhost. (
4 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ; Negative Cache TTL
)

@ IN NS 10.0.0.1
@ IN A 10.0.0.1
api IN A 10.0.0.1

Add to ``/etc/bind/named.conf.local``:

zone "twitter.com." {
type master;
file "/etc/bind/db.twitter.com";
};

Run:
$ rndc reload