1

Topic: AWStats

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Ubuntu 14.04.5 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I am running a custom Apache installation and want to run the AWStats from a virtual directory off of my mail RoundCube page; what configuration lines and security do I need?  I am met with a NOTFOUND page.  I added the following virtual directory to my RoundCube site:

<Directory "/usr/lib/cgi-bin/">
    DirectoryIndex awstats.pl
    Options ExecCGI

    AuthName "Authorization Required"
    AuthType Basic
    AuthBasicProvider file
    AuthUserFile /etc/apache2/awstats.users
    Require valid-user
</Directory>

----

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

2

Re: AWStats

FYI:

- https://bitbucket.org/zhb/iredmail/src/ … pache.conf NOTE: this is Apache config file for old iRedMail release - 0.9.6.
- https://bitbucket.org/zhb/iredmail/src/ … awstats.sh

3

Re: AWStats

That helped a little, I had to rewrite and create a new virtual site for awstats.  Thanks for your help, I'll post my source.

4

Re: AWStats

<VirtualHost *:80>
        ServerName awstats.example.com
        ServerAdmin webmaster@example.com
        DocumentRoot "/usr/lib/cgi-bin/"

        Redirect permanent / https://awstats.example.com/awstats

        ErrorLog ${APACHE_LOG_DIR}/awstats.example.com.error.log
        CustomLog ${APACHE_LOG_DIR}/awstats.example.com.access.log combined

        ServerSignature Off
</VirtualHost>

<VirtualHost *:443>
        ServerName awstats.example.com
        ServerAdmin webmaster@example.com
        DocumentRoot "/usr/lib/cgi-bin"

        Alias /awstats/icon "/usr/share/awstats/icon/"
        Alias /awstats/css "/usr/share/awstats/css/"
        Alias /awstats/js "/usr/share/awstats/js/"
        ScriptAlias /awstats "/usr/lib/cgi-bin/"

        Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"

        SSLEngine on
        SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
        SSLHonorCipherOrder on

        SSLCertificateFile /etc/ssl/certs/star.example.com.cert.pem
        SSLCertificateKeyFile /etc/ssl/private/star.example.com.privkey.pem
        SSLCertificateChainFile /etc/ssl/certs/star.example.com.chain.pem

        <Directory "/usr/lib/cgi-bin/">
                DirectoryIndex awstats.pl
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch

                AuthName "Authorization Required"
                AuthType Basic
                AuthBasicProvider file
                AuthUserFile /etc/apache2/awstats.users
                Require valid-user

                <IfVersion < 2.4>
                        Order deny,allow
                        Allow from 1.2.3.4
                </IfVersion>

                <IfVersion >= 2.4>
                        Require ip 1.2.3.4
                </IfVersion>
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/awstats.example.com.error.log
        CustomLog ${APACHE_LOG_DIR}/awstats.example.com.access.log combined

        ServerSignature Off
</VirtualHost>

5

Re: AWStats

Thanks for sharing. smile