Bug: Awstats can't follow internal links

interfasys

Verified User
Joined
Oct 31, 2003
Messages
1,821
Location
Switzerland
When on the awstats page, there are links to get the full listing of domains, Ips, etc.

The generated links are wrong:
domain.com.1012.alldomains.html
should be
awstats.domain.com.1012.alldomains.html

EDIT
This is using Awstats 7 and DA 1.37
 
Last edited:
Hello,

I assume you're referring the html version and not the awstats.pl version... and the links that are generated by awstats into it's html files.

I checked our test system, but the html version still appears to be working ok. I'm wondering if there might be a difference in the config:
./data/awstats.domain.com.conf

and what would be installed fresh..
Try renaming your awstats.domain.com.conf to something else, then run the awstats_process.sh again (or let DA do it with the tally) and run a diff on the two conf files..

If the conf is missing, the awstats_process.sh will copy:
/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf

to the awstast.domain.com.conf, and then proceed to do several perl regex's to it in order to set it as needed.

Let me know what the "diff" output is between the old and new conf file.


Note that the html version should still work fine..
However, the new feature of 1.37.0 is that is support the awstats.pl form, through DA.. so the html form is no longer needed.

http://www.directadmin.com/features.php?id=1125

John
 
Hello John,

It turns out there was a custom awstats_process.sh on the server, so I'll have to merge the changes to see if there is still a problem

One things I've noticed is that this path doesn't exist
/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf
this one is used instead
/usr/local/awstats-7.0/wwwroot/cgi-bin/awstats.model.conf

awstats_process.sh is looking for the original in the wrong folder.

Cheers,

Olivier
 
Hello,

When awstats.sh is run, it should create a link to the versioned directory.
Code:
[root@server ~]# ls -la /usr/local/awstats
lrwxrwxrwx  1 root root 11 Dec  9 14:59 /usr/local/awstats -> awstats-7.0
[root@server ~]#
John
 
Hello John,

My bad, I had forgotten to rename the backup config.

I manually called the original DA script
/usr/local/directadmin/scripts/awstats_process.sh USER DOMAIN
and the internal links were still wrong.

I can't find any information in the config about a prefix.

Cheers,

Olivier
 
Hmm... anyone else noticing this? I can't seem to find anything either.

One last thing to try is the old-reliable delete/rename everything and start over.

1) delete /usr/local/awstats*. The main thing being the versioned directory (awstats-7.0)..

2) reinstall:
Code:
cd /usr/local/directadmin/scripts
./awstats.sh

3) and finally, rename the awstats data path (just temporary, to see if it's something in there that's causing it):
Code:
cd /home/[b]username[/b]/domains/[b]domain.com[/b]/
mv awstats awstats.old

cd /usr/local/directadmin/scripts
./awstats_process.sh [b]username[/b] [b]domain.com[/b]


4) One last thing to check that just came to mind.. it's possible that awstats generates the files based on the name of the config... ensure you don't have extra configs in the .data directory like "domain.com.conf".. as it might be the case that the filenames are created based on the format of the name of the conf... It should be "awstats.domain.com.conf"

John
 
Hello John,

I've just followed these instructions and the internal links are all still missing the prefix "awstats" whereas all the files in the awstat folder start with it.

The config file is correctly named awstats.domain.com.conf

I've used the default config to make sure that plugins weren't introducing any weirdness.

Cheers,

Olivier
 
I've been able to duplicate the issue.
I found that awstats 7 is affected but 6.x is not..
All I did was:
Code:
cd /usr/local
rm -f awstats
ln -s awstats-6.7 awstats
then re-ran the awstats_process.sh on the domain, and the issue went away (I didn't realized I wasn't using 7 when I was testing)

I then tried 6.95, and it was not affected, so they've changed something between 6.95 (worked) to 7.0 (doesn't work) which is causing the issue.

My tests used the exact same data in /home/user/domains/domain.com/awstats, and the same awstats_process.sh script.
The only thing I was changing was the /usr/local/awstats link, to swap between versions.

I hunted around to see if there was an option to change the link value... but then realized that if it was an option, the value of the links should match the files they point to. Because of that logic, I can only assume that it's a bug, so will drop down the versions back to 6.95 until we get more info on this.

John
 
OK. I'm glad you were able to reproduce it :).
I've tried to look for a new variable in the perl script, but couldn't find any.
So, this has been reported upstream?

Cheers,

Olivier
 
Hello,

With the update to 7.1, the bug persisted, so I've instead spent several hours figuring out their perl code and found a fix for the build_staticpages.pl script.
This is the patch, just added 1 word: http://files1.directadmin.com/services/custombuild/patches/awstats_url.patch

However, to get the patch, you don't need to do anything special, just update awstats normally:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build awstats
Note that the sync of all files mirrors may take up to 24 hours, so be patient.

John
 
Back
Top