Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Webservers

rvolz edited this page Jan 11, 2013 · 10 revisions

BicBucStriim comes with a .htaccess file, a configuration for the Apache web server. This configuration is included because most NAS devices include a LAMP environment, and so the app can easily be installed. However, there are other web servers, and BicBucStriim doesn't require you to use Apache.

This section contains usage examples with different web servers or environments.

Apache on Raspberry Pi

This example assumes that you are using the standard Raspbian Wheezy distribution. Raspian is derived from Debian, so this example applies also to Debian, Ubuntu etc.

  1. Install Apache: sudo apt-get install apache2. (Note: This will also install the required sqlite3 library.)
  2. Install PHP: sudo apt-get install php5 php5-sqlite php5-gd. Install PHP 5.2+, the Sqlite3 support to read the Calibre metadata and the GD library to generate thumbnails.
  3. Enable URL Rewriting for Apache: sudo a2enmod rewrite
  4. Enable the usage of htaccess files (BucBucStriim incudes one):
    1. sudo nano /etc/apache2/sites-available/default
    2. In section <Directory /var/www> change 'AllowOverride NonetoAllowOverride All`.

The web server root directory is /var/www, so BicBucStriim should be installed there, using the usual process.

Lighttpd on Raspberry Pi

This example assumes that you are using the standard Raspbian Wheezy distribution. Raspian is derived from Debian, so this example applies also to Debian, Ubuntu etc.

  1. Install Lighttpd and Sqlite3: sudo apt-get install lighttpd sqlite3
  2. Install PHP: sudo apt-get install php5-common php5-cgi php5 php5-sqlite php5-gd. Install PHP 5.2+, the Sqlite3 support to read the Calibre metadata and the GD library to generate thumbnails.
  3. Enable the server to handle PHP scripts: sudo lighty-enable-mod fastcgi-php
  4. Add URL Rewriting for BicBucStriim:
    1. sudo nano /etc/lighttpd/lighttpd.conf
    2. Add the following lines at the end: url.rewrite-once = ("^/bbs/(?!(style|img|js|installcheck.php)).*$" => "/bbs/index.php/$1")
    3. Check that server.modules includes mod_redirect, if not add it.
  5. Reload the server: sudo service lighttpd force-reload

The web server root directory is /var/www, so BicBucStriim should be installed there, using the usual process.

Check Running a lightweight webserver on the Raspberry Pi (lighttpd) for more information about Lighttpd on the Raspberry Pi.

Ngnix on Raspberry Pi

This example assumes that you are using the standard Raspbian Wheezy distribution. Raspian is derived from Debian, so this example applies also to Debian, Ubuntu etc.

  1. Install Nginx and Sqlite3: sudo apt-get install nginx sqlite3
  2. Install PHP: sudo apt-get install php5-common php5-cgi php5 php5-sqlite php5-gd. Install PHP 5.2+, the Sqlite3 support to read the Calibre metadata and the GD library to generate thumbnails.
  3. Add URL Rewriting for BicBucStriim:
    1. sudo nano /etc/nginx/sites-available/default
    2. Change the root directory: root /var/www
    3. Add RUL Rewriting for BucBucStriim: location /bbs/ { try_files $uri $uri/ /bbs/index.php?$request_uri; }
  4. Reload the server: sudo service nginx reload

The web server root directory is /var/www, so BicBucStriim should be installed there, using the usual process.

Clone this wiki locally