Qmailadmin with Apache

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/


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

Instructions for configuring Drupal sites on Apache, Lighttpd and nginx.

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

Apache config

Configuration instructions for serving Trac with Apache.

TracModMython wiki page with detailed Apache instructions.

Apache requires mod_python to be installed in order to run Trac.

Simple Configuration
Edit /usr/local/apache2/conf/httpd.conf and add the following to instruct Apache to redirect any URLs starting with "/trac/" to Trac:

SetHandler mod_python
PythonInterpreter main_interpreter



Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI



Web-based Distributed Authoring and Versioning, or WebDAV, is a set of extensions to the Hypertext Transfer Protocol (HTTP) which allows users to collaboratively edit and manage files on remote World Wide Web servers.

Tutorial - http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Apache-WebDAV-LDAP-HOWTO.html#AEN228

Apache needs to be configured and compiled with the --enable-dav option.

Uncomment the WebDAV config file in /usr/local/apache2/conf/httpd.conf:

# Include conf/extra/httpd-dav.conf



Installation instructions for using PHP with the Apache web server.

Compiling and Installing
Configure PHP with the options you want. In this case, we'll be adding Apache

./configure \
--enable-mbstring \
--with-gd \
--with-gettext \
--with-apxs2=/usr/local/apache2/bin/apxs \

Configuration options:

  • MySQL support

  • LDAP support
  • Curl support (required by Drupal's Feeds module)

    Probably need to install curl-devel package first though:

    yum install curl-devel


SSL Encryption

Secure communication with your web server by using self-signed SSL certificates.

The typical method of enabling SSL encryption in Apache is to use mod_ssl. A downside of that approach is that SSL does not work with name-based Virtual Hosts (Why can't I use SSL with name-based/non-IP-based virtual hosts?).


LDAP Authentication

Apache can be configured to authenticate users against an LDAP database, such as Open Directory, part of Apple's OS X Server.


yum install openldap-devel

To install LDAP authentication support in Apache, it must be configured with:

--with-ldap --enable-ldap --enable-authnz-ldap

NOTE: --with-ldap appears to be broken in Apache 2.2.9.
Might also need:


Subscribe to RSS - apache

Recent Updates

  • 9 months 2 weeks ago
  • 9 months 2 weeks ago
  • 9 months 2 weeks ago
    php 8.x
  • 9 months 2 weeks ago
  • 9 months 2 weeks ago
    Drop Centos 5/6 stuff