[CentOS] Apache config for Squirrelmail?

Fri May 13 14:27:02 UTC 2005
James B. Byrne <ByrneJB at Harte-Lyne.ca>

This is my corrected configuration file for squirrelmail over ssl 
if anyone is interested:

# squirrelmail.conf 2005 May 13 James B. Byrne JBB8
#
# SquirrelMail is a webmail package written in PHP.
# This configuration file forces users to connect via SSL
#
# If the incoming request is already https:// then this
# file will only be processed if the directive:
#
# Include /etc/httpd/conf.d/squirrelmail.conf
#
# is appended to ssl.conf for the default server or added
# to the virtual host configuration file of the virtual
# host used to process webmail.  Note that ssl requires
# IP addressed virtual hosts to work and that the necessary
# Listen directives must be placed in the appropriate 
# configuration files as well.  
#
Alias   /webmail        /usr/share/squirrelmail

<Directory /usr/share/squirrelmail>
        AllowOverride None
        Options ExecCGI
        Order allow,deny
        Allow from all
</Directory>

RewriteEngine   on
RewriteLog      "/var/log/httpd/rewrite_log"
RewriteLogLevel 0

# AIDE-MEMOIRE
# Arguments $1, $2 etc. refer to () matches in the
#     CURRENT RewriteRule line.
# Arguments %1, %2 etc. refer to () matches in the 
#     LAST matched RewriteCond.

# Do not process established ssl squirrelmail sessions
RewriteCond     %{HTTPS} on
RewriteCond     %{REQUEST_URI} ^/webmail(/?|/.*)$
RewriteRule     (^.*$)   - [L,R]

# Rewrite short form URLs whether SSL or not for forms
# webmail.anything.dom and www.webmail.anything.dom
RewriteCond     %{HTTP_HOST} ^(www\.)?(webmail\.)(..+\.)(..+)$ [NC]
RewriteCond     %{REQUEST_URI} !^/webmail/
RewriteRule     (^.*$)   https://webmail.%3%4/webmail/ [L,R]

# Force SSL otherwise
RewriteCond     %{HTTPS} off
RewriteCond     %{REQUEST_URI} ^/webmail(/?|/.*)$
RewriteCond     %{HTTP_HOST} ^(.*\.)?(..+\.)(..+)$ [NC]
RewriteRule     (^.*$)   https://webmail.%2%3/webmail/ [L,R]

#EOF

--   
     *** e-mail is not a secure channel ***
mailto:byrnejb.<token>@harte-lyne.ca
James B. Byrne                Harte & Lyne Limited
vox: +1 905 561 1241          9 Brockley Drive
fax: +1 905 561 0757          Hamilton, Ontario
<token> = hal                 Canada L8E 3C3