Skip to main content

apache

IMAP authentication

Installation
Download the latest version of mod_auth_imap:

cd /extra/src
wget http://ben.brillat.net/files/projects/mod_auth_imap2/mod_auth_imap2-current.tar.gz
tar zxf mod_auth_imap2-current.tar.gz
cd mod_auth_imap2-2.2.0

If you use Dovecot, you'll need apply a patch:
wget http://path/to/patch
patch < ../dovecot_mod_auth_imap.patch

Stop image bandwidth theft

Prevent other websites from stealing your bandwidth by including your images in their pages.

  • Apache
    This example services up a different image instead:
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?example\.com [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} ^http://.*$
    RewriteRule \.(jpe?g|gif|bmp|png)$ /media/nohotlinks.png [L]
  • Lighttpd
    $HTTP["referer"] !~ "^(http://example\.com|http://www\.example\.com)" {
      $HTTP["referer"] != "" {
        url.access-deny = ( ".jpg", ".jpeg", ".png", ".gif", ".pdf" )
      }
    }

FastCGI

Posted in

FastCGI is a language independent, scalable, open extension to CGI that provides high performance and persistence without the limitations of server specific APIs.

Installation
Install fastcgi libraries:

cd /extra/src
wget http://www.fastcgi.com/dist/fcgi-current.tar.gz
tar zxf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure
make
make install

Download the mod_fastcgi source:
cd /extra/src
wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
tar zxf mod_fastcgi-current.tar.gz
cd mod_fastcgi-2.4.6
cp Makefile.AP2 Makefile
make
make install

PHP Configuration
In addition to any other directives, PHP needs to be configured with:

--enable-fastcgi \

mod_status

Posted in

The Status module allows a server administrator to find out how well their server is performing. A HTML page is presented that gives the current server statistics in an easily readable form. If required this page can be made to automatically refresh (given a compatible browser). Another page gives a simple machine-readable list of the current server state.

The details given are:

  • The number of worker serving requests
  • The number of idle worker
  • The status of each worker, the number of requests that worker has performed and the total number of bytes served by the worker (*)
  • A total number of accesses and byte count served (*)
  • The time the server was started/restarted and the time it has been running for
  • Averages giving the number of requests per second, the number of bytes served per second and the average number of bytes per request (*)

Apachetop

Posted in

ApacheTop is a curses-based top-like display for Apache information, including requests per second, bytes per second, most popular URLs, etc.

Installation
Install the prerequisite libraries:

yum -y install readline-devel ncurses-devel

Download the source code for apachetop:
cd /extra/src
wget http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz
tar zxf apachetop-0.12.6.tar.gz
cd apachetop-0.12.6

Configure and build it. You can optionally include a default log file to parse with a --with-logfile=/path/to/apache/logfile.
./configure
make
make install

Usage

Qmailadmin with Apache

Posted in

Configuring Qmailadmin to work with the Apache webserver

Apache virtual host configuration
Edit /usr/local/apache2/conf/extra/httpd-vhosts.conf and add a virtualhost directive for Qmailadmin and webmail:

ServerAdmin postmaster@example.com
DocumentRoot /var/websites/mail/htdocs
ServerName mail.example.com

Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

ScriptAlias /cgi-bin/ "/var/websites/mail/cgi-bin/

Syndicate content