FAQ

Page Discussion Edit History

BruisedFruit

This page needs some love! Are you qualified to bring it up to the standards of our documentation?

This page has been recognized as a useful topic for the wiki, but is unsuitable in its current state for the following reason:

What is Bruised Fruit? Also, the PHP location doesn't work as it appears to be intended.


Below is an example of how to get the Bruised Fruit wiki working.

server {
        server_name wiki.domain.tld;
        root /var/www/bruisedfruit;
 
        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }
 
        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }
        location / {
                # This is cool because no php is touched for static content
                try_files $uri $uri/ @rewrite;
        }
 
        location @rewrite {
                rewrite ^/wiki/search(.*)$ /search.php?search=$1 last;
                rewrite ^/wiki/([^/]+)/([^/]+)/?$ /index.php?page=$1&timestamp=$2 last;
                rewrite ^/wiki/(.*)$ /index.php?page=$1 last;
        }
 
        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
                fastcgi_pass unix:/tmp/phpcgi.socket;
        }
 
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }
}