server {
    server_name quantifiedselfforum.com;

    access_log logs/qsforum.access;
    error_log logs/qsforum.error error;

    root /var/www/qsforum;

    location / {
        index index.php;
    }

    # Deny access to internal files.
    location ~ /(inc|uploads/avatars) {
        deny all;
    }

    # Pass the php scripts to fastcgi server
    location ~ \.php$ {
        fastcgi_pass unix:/tmp/php.socket;
        # Necessary for php.
        fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        # Unmodified fastcgi_params from nginx distribution.
        include fastcgi_params;
    }

}
