Spam Board on lighttpd



Run through the installer as normal, but don't select to set up 'short URLs'. You can use this feature, but it requires some tweaking later, because it has to be configured in the webserver's global configuration file.


For the following settings, you need to have write access to lighttpd's global configuration file. Unless you are the administrator of the server, you probably won't have this. It is not recommended to run Spam Board without securing the directories. Setting short URLs, on the other hand, is not needed (but it's still nice to have).

Securing Directories

Also see Securing Directories for basic explanations.

lighttpd can prevent access to the directory, but it can only be set in the global configuration file of the webserver. That is why the installer script can't set it for you. In the configuration file, set the following (replace 'spamboard' with your own path):

## Spam Board security settings
$HTTP["url"] =~ "^/spamboard/db" {
  url.access-deny = ("")
$HTTP["url"] =~ "^/spamboard/sessions" {
  url.access-deny = ("")
## Spam Board non-crucial security settings
$HTTP["url"] =~ "^/spamboard/classes" {
  url.access-deny = ("")
$HTTP["url"] =~ "^/spamboard/admin/classes" {
  url.access-deny = ("")
$HTTP["url"] =~ "^/spamboard/includes(^/styles)" {
  url.access-deny = ("")

Turning off directory listing

This isn't essential, but it's still better to do. Here's an example configuration:

## don't list directory contents inside Spam Board dirs
$HTTP["url"] =~ "^/spamboard/" {
  dir-listing.activate = "disable"

Short URLs

Log in to the Administration Panel and enable short URLs in the settings. This will make your board non-functional for the moment, so better put it in maintainance mode, too.

Open the lighttpd configuration file in your favourite text editor (or another text editor which is handy). Make sure mod_rewrite is enabled in server.modules. Add this to your configuration file (use your own pathes instead of 'spamboard', of course):

## Spam Board 'Short URLs'
url.rewrite-once = ( "^/spamboard/(index\.php|install\.php).*$" => "$0",
                     "^/spamboard/admin/([a-z0-9_\-]+)\.php\?(.*)$" => "/spamboard/admin/index.php?show=$1&$2",
                     "^/spamboard/([a-z0-9_\-]+)\.php\?(.*)$" => "/spamboard/index.php?show=$1&$2")

Reload lighttpd. Turn off maintainance mode again.

Last modified 9 years ago Last modified on 12/25/07 22:11:42