#602 Can't put .conf file in /etc, script die


AWSTATS VERSION (no support for older versions than 3.0 and beta versions):
OS (Windows/Unix) + VERSION : Unix
WEB SERVER NAME (IIS/Apache/...) + VERSION : Apache
If your site is online, give your awstats URL: http://www.digitalsnafu.com/cgi-

Your problem description :

Hello, your software looks great! (Though I have yet to see it functional on my site).

First a little background to my problem; my host will not allow me to place
the .conf file in /etc, however by placing the file in the same directory as
awstats.pl I am able to successfully run “awstats.pl -config=site –update” from the
command line. The problem comes when I attempt to run awstats.pl from a
browser; the program dies with the following message:

Error: Couldn't open config file "awstats.digitalsnafu.com.conf"
nor "awstats.conf" : No such file or directory

Setup (Config file, web server or permissions) may be wrong.
See README.TXT for informations on how to setup awstats.

Is it possible to modify the source code so that the .conf file is in the proper
location? Or am I missing the problem completely, I have tried changing the
permissions for the .conf file from one end of the spectrum to the other without
any luck. I don’t have a much experience (perhaps any is a better term) with perl
but the only reference I can find to the .conf file location is in awstats.pl line 415,
and my playing achieved only more of the same error codes.

I hope I make sense, and I really hope you can help, thank you ever so kindly in



  • Forrest R. Stevens

    Logged In: YES

    The config file is just fine being in the same directory as awstats.pl.
    Your problem is most likely a permissions issue. I would guess that the
    web server user does not have read rights to the configuration file.
    Double check that read permissions have been granted for the
    configuration file for the Apache user.

  • Nobody/Anonymous

    Logged In: NO

    Hi, thanks for the information, no luck though, I have
    provided all the read permissions I can for the file, but
    its still giving me the same errors. Any other ideas?

  • Forrest R. Stevens

    Logged In: YES

    I don't know whether this is how you have it set up currently, but try
    naming your config file awstats.conf or
    awstats.www.digitalsnafu.com.conf, world readable, and place it in
    the same directory as awstats.pl (your cgi-bin directory).

    From the
    command line, use the following command:
    ./awstats.pl -
    config=www.digitalsnafu.com -update

    You should only receive
    something similar to this as output:

    Lines in file: 5273
    Found 423
    new records,
    Found 0 corrupted records.

    If you receive anything
    other than the above output from the command line it's likely that
    something isn't working. If the above command executes without any
    problems, try running the following from the command

    ./awstats.pl -config=www.digitalsnafu.com -output >

    The contents of results.html should be valid HTML
    containing the awstats.pl generated statistics. Let me know how you
    fare or if you've already tried the above.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks