# Problem with Awstats (CGI) and Apache 2.2 [Solved]

## hurgh

Hi All,

I have had apache 2.0 running fine for a while, and tonight I upgraded to 2.2. This all went fine, I went through all my config files and made the needed changes, but I am having trouble getting my awstats.pl script to run.

I have not made any changes to the config that previously worked, and as far as I can tell everything needed is in the new config files.

Here is the error i am getting when visiting the page:

```
[Thu Sep 13 23:06:05 2007] [error] [client 212.12.26.48] client denied by server configuration: /server/www/awstats/cgi-bin/awstats.pl
```

I did notice these 2 lines in a file called apache2-builtin-mods

```
#mod_cgi disabled              # enable via USE-flag

#mod_cgid disabled             # enable via USE-flag
```

I tried uncommenting the first one and changing disabled to shared, but that did not seem to help.

I have added the ExecCGI option to the directory directive where it was not already there, and still no joy.

Does any one know if I am missing something simple, or if there was a change to the way CGI was setup in apache 2.2?

Any suggestions would be much appreciated.

Regards

-Hurgh-Last edited by hurgh on Thu Sep 13, 2007 2:08 pm; edited 1 time in total

----------

## steveb

You probably have awstats installed outside the normal htdocs directory and you need to enable cgi to run on those directories. Edit /etc/apache2/modules.d/00_mod_mime.conf and change this part:

```
# To use CGI scripts outside of ScriptAliased directories:

# (You will also need to add "ExecCGI" to the "Options" directive.)

#AddHandler cgi-script .cgi
```

// SteveB

----------

## hurgh

Hi Steve,

Thanks for the reply, as you can see in my original post, I have already tried that:

 *Quote:*   

> I have added the ExecCGI option to the directory directive where it was not already there, and still no joy.

 

I have however found the problem.

It is the initial <Directory /> Directive in the 00_default_settings.conf file.

I just commented out the 2 lines

```
#       Order deny,allow

#       Deny from all

```

to make it match my old one, and then everything started working.

Thanks for the reply.

-Hurgh-

----------

