Ok so I've merged all the files into one to create 2 virtual hosts, one for http and another for https, but I'm having a couple of issues.
Roundcube works fine, but I can't seem to access either dbmailadmin or iredadmin. Here's the file I created:
<VirtualHost *:80>
ServerAdmin postmaster@domain.com
DocumentRoot /var/www/html/
ServerName mail.domain.com
#AWSTATS
<Directory /var/www/awstats/>
DirectoryIndex awstats.pl
Options ExecCGI
Order allow,deny
allow from all
#allow from 127.0.0.1
AuthName "Authorization Required"
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative Off
AuthLDAPUrl ldap://127.0.0.1:389/o=domainAdmins,dc=doamin,dc=com?mail?sub?(&(objectclass=mailAdmin)(accountStatus=active))
AuthLDAPBindDN "cn=vmail,dc=doamin,dc=com"
AuthLDAPBindPassword "password"
Require valid-user
</Directory>
#DBMAILADMIN
#WSGIScriptAlias /dbmailadmin /var/www/dbmailadmin/dbmailadmin.py/
#Alias /dbmailadmin/static /var/www/dbmailadmin/static/
WSGIDaemonProcess dbmailadmin user=dbmailadmin threads=15
WSGIProcessGroup dbmailadmin
AddType text/html .py
<Directory /var/www/dbmailadmin/>
Order allow,deny
Allow from all
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</Directory>
#IREDMAILADMIN
#WSGIDaemonProcess iredadmin user=iredadmin threads=15
#WSGIProcessGroup iredadmin
AddType text/html .py
<Directory /var/www/iredadmin/>
Order allow,deny
Allow from all
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</Directory>
#ROUNDCUBE
Alias / "/var/www/roundcubemail/"
<Directory "/var/www/roundcubemail/">
Options -Indexes
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin postmaster@domain.com
DocumentRoot /var/www/html/
ServerName mail.domain.com
#ROUNDCUBE
Alias / /var/www/roundcubemail/
#AWSTATS
Alias /awstats/icon /var/www/awstats/icon/
ScriptAlias /awstats /var/www/awstats/
#IREDADMIN
WSGIScriptAlias /iredadmin /var/www/iredadmin/iredadmin.py/
Alias /iredadmin/static /var/www/iredadmin/static/
#DBMAILADMIN
WSGIScriptAlias /dbmailadmin /var/www/dbmailadmin/dbmailadmin.py/
Alias /dbmailadmin/static /var/www/dbmailadmin/static/
SSLEngine on
SSLProtocol +SSLv3 +TLSv1
SSLCACertificateFile path to crt
SSLCertificateFile path to crt
SSLCertificateKeyFile path to key
SSLCertificateChainFile path to crt
</VirtualHost>
Am I missing some directives? Both mail.domain.com/dbmailadmin and /iredadmin report as being not found.
Thanks a lot for everything, this community really is very helpful!
Arthur