Ubuntu – Configuring Fancy URLs in Apache2 for Statusnet on Ubuntu [Resolved]

apache-2.2laconicamod-rewriteUbuntu

I'm trying to evaluate statusnet (formally laconica) for deployment as our internal microblogging system but have run into a bit of a wall.

I have the latest version (0.8.2) installed and running, i.e. I can register as a user, post messages etc. So what's the problem? Fancy URLs won't work.

I've followed the instructions here and as soon as I add the $config['site']['fancy'] = true line to my config.php file I start getting errors when I click away from the homepage, e.g. clicking on the Groups tabs results in a "404 Not Found Error" for URL /statusnet/group. Removing the line from config.php returns the systems to it's working state.

It's clear that statusnet is attempting to use the 'fancy urls' and I'm thinking that there is a problem with the apache2 configuration – but I'm a bit of a n00b in the realms of Apache configuration.

I've enabled mod_rewrite and used the phpinfo() method to confirm that it is loaded. There is a htaccess.sample file in the statusnet folder which I have renamed to .htaccess and updated RewriteBase to read /statusnet/. The Apache logs don't reveal anything useful apart from a 'File does not exist': /var/www/statusnet/group referer: http://localhost/statusnet.

I have now hit the limit of my knowledge of Apache2 (told you I was a n00b).

I've tried the statusnet IRC but let's just say 'tumbleweed' and leave it at that.

Thanks in advance

[Edit] Sorted: I needed to update the 'AllowOverride' parameter from None to All. Problem was that the directive was not in httpd.conf or apache2.conf as other posts suggest. I finally located it in /etc/apache2/sites-enabled/000-default [obvious I suppose]. A quick restart of apache and I'm up and running.

Best Answer

@DilbertDave, I've added the following to the Fancy URLs section of the StatusNet readme:


If it doesn't work, double-check that AllowOverride for the StatusNet directory is 'All' in your Apache configuration file. This is usually /etc/httpd.conf, /etc/apache/httpd.conf, or (on Debian and Ubuntu) /etc/apache2/sites-available/default. See the Apache documentation for .htaccess files for more details:

http://httpd.apache.org/docs/2.2/howto/htaccess.html

Also, check that mod_rewrite is installed and enabled:

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html