1

Topic: Configuring iredadmin as a virtual host

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version (check /etc/iredmail-release): iRedMail-0.9.2
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  Mysql
- Web server (Apache or Nginx):Apache
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:

[Sat Oct 10 12:20:20.024378 2015] [autoindex:error] [pid 7395] [client 192.168.56.1:49726] AH01276: Cannot serve directory /opt/www/iredadmin/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

====

Hello am trying to configure iredadmin as a sub-domain such as https://mailadmin.dave.com/. Means configuring it as a virtual host.

Here's my iredadmin.conf file

<VirtualHost *:443>
        DocumentRoot /opt/www/iredadmin/
        ServerName mailadmin.dave.com

        SSLEngine On
        SSLCertificateFile /etc/ssl/certs/iRedMail.crt
        SSLCertificateKeyFile /etc/ssl/private/iRedMail.key
       
        Alias /iredadmin/static "/opt/www/iredadmin/static/"
        WSGIScriptAlias /iredadmin "/opt/www/iredadmin/iredadmin.py/"
        <Directory /opt/www/iredadmin/>
                Require all granted
        </Directory>

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        </Directory>
       
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

However, so far when I try to visit https://mailadmin.dave.com/, I get the error

Forbidden

You don't have permission to access / on this server.

and the apache error log says
[Sat Oct 10 12:20:20.024378 2015] [autoindex:error] [pid 7395] [client 192.168.56.1:49726] AH01276: Cannot serve directory /opt/www/iredadmin/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

I looked for the index file in iredadmin folder found at /opt/www/iredadmin, but there is none.

However, I can access  https://mailadmin.dave.com/iredadmin. I just want to be accessed with  https://mailadmin.dave.com/ only. Thanks for the help

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Configuring iredadmin as a virtual host

Try this:

        Alias /static "/opt/www/iredadmin/static/"
        WSGIScriptAlias / "/opt/www/iredadmin/iredadmin.py/"

3

Re: Configuring iredadmin as a virtual host

Totally works! Thanks a lot.