How do I configure AWStats on centos 7 apache ?

Following this guide
I'm trying to configure AWStats but get the error
client denied by server configuration: /usr/share/awstats/wwwroot/cgi-bin/

I think I have the apache server configured correctly? Here are the entries in my config files that seem to relate below.

Is the "require ip" and the "allow from" the address of the web client I am using to connect to my linode server? I assume so…

Thanks for the help.

<Directory "/var/www/cgi-bin">
    Options +ExecCGI
    AddHandler cgi-script .cgi .pl .py
    AllowOverride None
    Options All
    Require all granted

<IfModule alias_module>
  ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

Alias /awstatsclasses "/usr/share/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/share/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/share/awstats/wwwroot/cgi-bin/"

<Directory "/usr/share/awstats/wwwroot">
    Options None
    AllowOverride None
    <IfModule mod_authz_core.c>
        # Apache 2.4
        Require local
        Require ip IP address of the web client I'm connecting from?
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order allow,deny
        Allow from
        Allow from IP address of the web client I'm connecting from?
        Allow from ::1
# Additional Perl modules
<IfModule mod_env.c>
    SetEnv PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins

2 Replies

I'm using apache 2.4
I played around with the ip addresses to see which ip would allow access but no luck. I finally added
Require all granted to allow access. I'll probably restrict the url with an .htaccess password.

@RonTech101 --


Allow from IP address of the web client I'm connecting from?

I think you're on the right track here… You probably don't run browsers on your Linode (i.e., and/or ::1). Your browser runs on a node in someone else's network (Comcast?). That's the thing you have to Allow from

The caveat here is that, unless you're the network operator, your IP address is assigned via DHCP[6] so it can change periodically. You'll have to account for that too.

-- sw


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct