Menu

#867 Static page generated by awstats 7 have broken links

7.0
open
nobody
5
2012-10-11
2011-05-16
jnsc
No

When using awstats_buildstaticpages.pl the links on the page (unknown ip for example) ends in a 404 error. The link point to http://mysite.com/stats/www.mysite.com.2011-05.unknownip.html but the files are located at http://mysite.com/stats/awstats.www.mysite.com.2011-05.unknownip.html (notice the extra awstats at beginning).

This was working with 6.95

I will try to work out whats wrong and provide a patch.

Discussion

  • Olivier - interfaSys

    I just wanted to confirm this. We reported it to the Directadmin devs 9 months ago and this bug is the only reason Directadmin can't ship with 7.0.

     
  • brrrt

    brrrt - 2011-11-18

    FIX:

    awstats_buildstaticpages.pl change line #451:

    $OutputFile=($OutputDir?$OutputDir:"")."awstats.$OutputSuffix.$output.$StaticExt";

    to:

    $OutputFile=($OutputDir?$OutputDir:"")."$OutputSuffix.$output.$StaticExt";


    patch:

    awstats_buildstaticpages.pl.orig 2011-06-08 14:03:07.000000000 +0200
    --- awstats_buildstaticpages.pl 2011-11-18 17:15:06.000000000 +0100
    ***
    448,454 ****
    my $command="$smallcommand -output=$output";
    print "Build $output page: $command\n";
    $retour=$command 2>&1;
    ! $OutputFile=($OutputDir?$OutputDir:"")."awstats.$OutputSuffix.$output.$StaticExt";
    open("OUTPUT",">$OutputFile") || error("Couldn't open log file \"$OutputFile\" for writing : $!");
    print OUTPUT $retour;
    close("OUTPUT");
    --- 448,454 ----
    my $command="$smallcommand -output=$output";
    print "Build $output page: $command\n";
    $retour=$command 2>&1;
    ! $OutputFile=($OutputDir?$OutputDir:"")."$OutputSuffix.$output.$StaticExt";
    open("OUTPUT",">$OutputFile") || error("Couldn't open log file \"$OutputFile\" for writing : $!");
    print OUTPUT $retour;
    close("OUTPUT");

     

Log in to post a comment.