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 {
    listen 109.74.198.23:80;
    server_name bits.scorpionworld.it;
    access_log /srv/www/bits.scorpionworld.it/logs/access.log;
    error_log /srv/www/bits.scorpionworld.it/logs/error.log;

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

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


    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param  SCRIPT_FILENAME  /srv/www/bits.scorpionworld.it/public_html$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)

Comments