diff --git a/INSTALL.md b/INSTALL.md index d965d49..d34c5c2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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: @@ -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``: 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 @@ -55,6 +36,7 @@ Create ``/etc/apache2/sites-available/bugle``: 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 @@ -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