StatusNet on nginx

StatusNet is an opensource twitter-like clone. You can install StatusNet on your own server and run your private status server for people in your organization.

Install is pretty straight-forward, so I am not showing here any bit to you. I am attaching here my nginx configuration file and the relevant option in StatusNet config.php to enable fancy URLs.

server {
    access_log /srv/www/;
    error_log /srv/www/;

    location ~* (\.jpg|\.png|\.gif|\.jpeg)$ {
      valid_referers none blocked *;
      if ($invalid_referer) {
        return 403;
      root   /srv/www/;

    location / {
        root   /srv/www/;
        index  index.php;
        if (!-e $request_filename) {
                rewrite  ^(.*)$  /index.php?p=$1  last;

    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_index index.php;
        fastcgi_param  SCRIPT_FILENAME  /srv/www/$fastcgi_script_name;

And add to /config.php:

$config['site']['fancy'] = true;

🇬🇧 🇺🇸 If you found value in my content, consider supporting me by treating me to a coffee, beer, or pizza. Your contributions help fuel more quality content creation.

🇮🇹 Se hai apprezzato i miei contenuti, considera di supportarmi offrendomi un caffè, una birra o una pizza. I tuoi contributi aiutano a creare contenuti di qualità.

🇬🇧 🇺🇸 If you have found inaccuracies or wish to improve this article, please use the comments section below (after clicking on Load Comments).

🇮🇹 Se hai trovato imprecisioni o vuoi migliorare questo articolo, utilizza la sezione commenti qui sotto (dopo aver cliccato Load Comments)