- Logging unconfigured domain names in Apache
- A Google Map with company logo and travel directions
- Multilingual websites and webapplications using PHP and Smarty, part 2: dictionary based templates
- Off-by-one errors in background placement in web browsers
- Security through obscurity with HTTP Basic Authentication
Running your own microblogging service
July 28, 2010,
Microblogging services such as Twitter and identi.ca have become very popular. Instead of registering with an existing service you can also quite easily run your own microblogging service, using Status.Net.
When Twitter was introduced it was immediately written off as a fad. Although microblogging services do have their drawbacks (identi.ca has tons of spam, people on Twitter and identi.ca are using it as a discussion platform instead of posting short announcements) I have found it to be quite useful when I quickly want to know about something that is happening right now.
One of the drawbacks of using services like Twitter or identi.ca is that it is a bit hard to control what happens with your tweets or dents. If you sign up for an account in identi.ca you have to explicitely agree to make your messages available under a certain creative commons license.
Twitter allows for messages to be private, but despite that you might still want to run a private microblogging service. Examples could be to hook it up to an internal build service (so you can track compilation status of packages), or to an internal issue tracker. There are probably many uses for it.
Installing your own microblogging service is not hard. The status.net microblogging software (which powers identi.ca) has been released under the AGPL license and requires nothing more than a webserver with PHP installed. With your own install you can make a few things possible, such as:
- microblogging on your own vanity domain (and, since status.net is federated it is easy to hook it up to other services)
- having a shielded microblogging internal for your own company or project
Configuration is extremely simple: unpack status.net and follow the HOWTO in the status.net source archive. One thing that you might not find very easily in the documentation is how to do virtual hosting with status.net. It is in fact very easy:
- create a separate database for your virtual host
- create a directory /etc/statusnet/ and add a file for each virtual host, named $virtualhost.php, for example example.org.php. A good start for this file is config.php.sample which you can find in the status.net source archive.
The documentation is pretty self explanatory, but there are two directives that are useful to lock down an instance.
To close the website for registration you should add or change the following line:
$config['site']['closed'] = true;
To make the status.net instance private you should add or change this line:
$config['site']['private'] = true;
In a future article we'll look at how to integrate this in a more extensive hosting environment.