lighttpd

SquirrelMail with Lighttpd

Prerequisites

Lighttpd Configuration

Edit your lighttpd.conf and add an alias for your Squirrelmail install:

alias.url = (
"/webmail" => "/var/websites/webmail/squirrelmail",
)

Qmailadmin with Lighttpd

Configure Qmailadmin to work with the Lighttpd webserver.

Qmailadmin Installation
Create some directories to hold the Qmailadmin web files:

mkdir -p /var/websites/qmailadmin
mkdir /var/websites/qmailadmin/htdocs
mkdir /var/websites/qmailadmin/cgi-bin

While still in the Qmailadmin source folder, create a go file to contain the Qmailadmin configuration options:
./configure \
--enable-cgibindir=/var/websites/qmailadmin/cgi-bin \
--enable-htmldir=/var/websites/qmailadmin/htdocs \
--enable-ezmlmdir=n

SSL with Lighttpd

Use SSL encryption on your Lighttpd webserver.

Lighttpd installation
Lighttpd needs to be configured and compiled with SSL enabled:

./configure --with-openssl
make
make install

After lighty has been installed, you can confirm that it has been compiled with ssl enabled:
lighttpd -v

SSL Configuration

mkdir /root/lighttpdssl
openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes
chown nobody:nobody lighttpd.pem
chmod 600 lighttpd.pem

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

Web Stats

Study the traffic to your website with a web stats analysis program.

Two popular Open Source packages for analysing web server log files are Awstats and Webalizer.

There is a detailed comparison at the Awstats website.

Webserver configuration

Apache and Lighttpd instructions for configuring Drupal virtual hosts.

Apache Virtual Host Configuration
Enable the virtual host config file in /usr/local/apache2/conf/httpd.conf by uncommenting it:

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

Edit /usr/local/apache2/conf/extra/httpd-vhosts.conf and add an entry for your new Drupal install:

ServerName www.domain.com
#ServerAlias *.domain.com
DocumentRoot /var/websites/projectname/drupal-5.10

Options Indexes FollowSymLinks
AllowOverride All

lighttpd

Installing PHP with the lighttpd web server.

Compiling and Installing
At a minimum, for installing the lighttpd, PHP needs to be configured with these options:

./configure \
--enable-mbstring \
--with-gd \
--with-gettext \
--enable-fastcgi \
--enable-discard-path \
--enable-force-cgi-redirect

The --with-apxs2 and --with-apxs configuration options are not required. Add any other PHP options that you need.
MySQL, add:
--with-mysql=/usr/local/mysql

If you want to include LDAP support, add:
--with-ldap

Lighttpd

Security, speed, compliance, and flexibility -- all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems.

Prerequisites
lighttpd requires the headers for libprce and zlib. If the lighttpd configure script can't find them, you'll need to install them.
pcre:

cd /extra/src
wget http://sourceforge.net/projects/pcre/files/pcre/8.00/pcre-8.00.tar.gz/download
tar zxvf pcre-8.00.tar.gz
cd pcre-8.00
./configure
make
make install

or, with CentOS 5, install the pcre-devel package:
yum install pcre-devel

zlib:

cd /extra/src
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3

Syndicate content