Virtual Hosts

Create a directory to hold the virtual host config files:

cd /var/service/lighttpd/root
mkdir sites

Create a conf file for your virtual host, /var/service/lighttpd/root/sites/www.example.com.conf:

var.basedir = "/var/websites/www.example.com/"
server.document-root = basedir + "htdocs/
accesslog.filename = basedir + "logs/access.log"

Edit /var/service/lighttpd/root/lighttpd.conf and add:

# map all domains of a top-level-domain to a single document-root
$HTTP["host"] =~ "(^|\.)example\.com$" {
  include "sites/www.example.com.conf"
}

Drupal Clean-URLS:

url.rewrite-if-not-file = (
  "^\/([^\?]*)\?(.*)$" => "/index.php?q=$1&$2",
  "^\/(.*)$" => "/index.php?q=$1"
)

Recent Updates

  • 7 months 1 week ago
  • 7 months 1 week ago
  • 7 months 1 week ago
    php 8.x
  • 7 months 1 week ago
    10.6.7
  • 7 months 1 week ago
    Drop Centos 5/6 stuff