# awstats.pl download rather than execute... help

## ecosta

Hi all,

could someone tell me why I am offered to download 'awstats.pl' rather than execute it?

I have seen a few people have had that error but no solution was given.

Here is what I have done up to now:

```

# emerge -av awstats

```

```

# webapp-config -I -h www.example.com -d awstats awstats 6.5-r1

```

/etc/conf.d/apache2

APACHE2_OPTS="-D DEFAULT_VHOST -D SSL_DEFAULT_VHOST -D PHP5 -D SSL"

/etc/apache2/vhost/myvhost.conf

NameVirtualHost *:80

Alias /awstats/classes "/var/www/www.example.com/htdocs/awstats/classes/"

Alias /awstats/css "/var/www/www.example.com/htdocs/awstats/css/"

Alias /awstats/icons "/var/www/www.example.com/htdocs/awstats/icon/"

ScriptAlias /awstats/ "/var/www/www.example.com/cgi-bin/"

ScriptAlias /awstats "/var/www/www.example.com/cgi-bin/awstats.pl"

ScriptAlias /awstats.pl "/var/www/www.example.com/cgi-bin/awstats.pl"

<VirtualHost *:80>

        ServerName www.example.com

        DocumentRoot /var/www/www.example.com/htdocs

        ErrorLog /var/log/apache2/www.example.com.error_log

        CustomLog /var/log/apache2/www.example.com.access_log combined

        <Directory />

                AllowOverride All

        </Directory>

        <Directory /var/www/www.example.com/htdocs>

                AllowOverride None

                Options +Indexes +FollowSymLinks +MultiViews

                Allow from all

                <IfModule mod_access.c>

                        Order Deny,Allow

                </IfModule>

        </Directory>

        <Directory "/var/www/www.example.com/cgi-bin">

                Options ExecCGI

                AllowOverride None

                <IfModule mod_access.c>

                        Order allow,deny

                        Allow from all

                </IfModule>

        </Directory>

/etc/awstats/awstats.www.example.com.conf 

# grep -v ^# /etc/awstats/awstats.www.example.com.conf | grep ..

LogFile="/var/log/apache2/www.example.com.access_log"

example=W

LogFormat=1

LogSeparator=" "

SiteDomain="www.example.com"

HostAliases="www.example.com localhost 127.0.0.1 REGEX[myserver\.com$]"

DNSLookup=2

DirData="../datadir"

DirCgi="/cgi-bin/awstats"

DirIcons="/awstats/icons"

...the rest are default settings

Can you tell me what I am doing wrong?  I added "-D PERL" to /etc/conf.d/apache2 but that didn't help.

All advice apreciated  :Smile: 

 -Ed

----------

## keli

you don't have perl/mod_perl installed and/or configured to work with apache.

Once you do that, restart your apache.

Let me know if this isn't enough help  :Wink: 

----------

## ecosta

Hi keli,

I'll need more help  :Wink: 

I added "-D PERL" to /etc/conf.d/apache2 and restarted apache but it still won't do the job.

What am I missing?

mucho thanks

 -Ed

----------

## ecosta

I followed "http://gentoo-wiki.com/HOWTO_Apache2_with_perl" and made the changes to "/etc/apache2/modules.d/75_mod_perl.conf".

It now works!  :Smile: 

Hope this helps someone else.

 -Ed

----------

## nixnut

Moved from Installing Gentoo to Networking & Security.

Not about getting gentoo installed, so moved here.

----------

