AwStat installation...
 
Notifications
Clear all

AwStat installation guide. (Win 2016)

Page 1 / 2

King-Dude
Posts: 40
Topic starter
(@king-dude)
Eminent Member
Joined: 6 years ago

Now i have a working solution so maybe this will help someone.

I had some problem before with Awstat 400 and i couldnt solve it. i was trying to install that on one of my webservers.

Now i have install it like this on my portal server, probably you dont need to make any modification in the install script, but i did not want to have some things that the script is installing

So this is how i make it work.

Install Awstats.

Download http://installer.solidcp.com/Files/1.1.2/Tools/SolidCP-Configuration-Tool.zip

Unpack and I made a mod on the script
And it was complaining about ROW 4737 that it couldnt find the download path.
So i change it to this.

(New-Object System.Net.WebClient).DownloadFile("http://installer.solidcp.com/Files/stable/Tools/SolidCP-AWStatsViewer.zip", "C:_Install Files$($AwStats_WebApp.FolderName)SolidCP-AWStatsViewer-$dSolidCPversion.zip")

And i changed under ROW 625 Main menu Option 5 so i only have this

#####################
Function MainMenu_Option_5() { # Function to call multiple functions to install AwStats
CheckSolidCPdomainUser "Server"
dCheckIPaddressesSet
CLS
Write-Host "`n`n`n`n`n`n`n`n"  # This brings the text down by 8 lines to allow fo the Windows Features installation overlay
Write-Host "Installing the 'AwStats Server'" -ForegroundColor Magenta
Write-Host "`tStarting server setup for SolidCP`n" -ForegroundColor Gray
InstallAwStats
HardenDotNETforIIS
InstallActivePerl
InstallDisablePasswdComplex
dPressAnyKeyToExit

####################################

I dont see a point were it should install all the other stuff on a server that dont need PHP and Python etc its just make it more open for bad things to happen.

After the script has install all the files, it didnt add my Enterprise server even if i typed it in.

So in web.config file i added that like this.
<add key="AWStats.SolidCPAuthenticationProvider.EnterpriseServer" value="http://My IP to Enterprise server:9002" />

Then after install i go in to

Configuration /Servers /settings on the server i have install awstats
Add Statistics

I made some changes because this is a 64 bit server (Win 2016) it install Perl64

So
Batch File Line Template:    its %SYSTEMDRIVE%perl64binperl.exe awstats.pl config=[DOMAIN_NAME] -update

The log format on Win 2016 is u_ex so i change that in configuration template.

LogFile = "[LOGS_FOLDER]u_ex%YY-3%MM-3%DD-3.log"

I enable UNC Path (my statistic server is on another server than webservers so it can get the log files)

add your domainname go to IIS under SolidCP AwStats what name it should listen to so i change the url to.

http://stat.mydomain.com/cgi-bin/awstats.pl?config=[domain_name]

And then add statistic under your virtuall server then hostingplan.

 

Regards

 

Pelle

8 Replies
Marco Tiggelaar
Posts: 1958
Admin
(@m-tiggelaar)
Contributor
Joined: 6 years ago

Hello,

thank you for your guide.

If you want we can add it to our manuals, (or i can give you rights so you can add it - when you personally add it it will list you as the author, where you can have a short bio / url at the bottom of each post)

If i add it for you it will have my bio at the bottom but i can still place a url / reference towards you/ your company?

Regards,

Marco

Reply
Daniel Reis
Posts: 6
(@reisier)
Active Member
Joined: 5 years ago

Hello,

I was following leads to install and configure AWStats and this thread really helped me. Thanks to King-Dude and DatatechUK.

My environment is Windows Server 2012 R2 Standard, English version.

After successful installation with the script, I detected some bugs that i'm sharing to let you guys now and possible correct.

  1. The scheduled task is not pointing to the correct updatestats.bat file, the correct file should be located in C:AWStatswwwrootcgi-bin and the start in argument is important to be configured
  2. In C:AWStats there are an updatestats.bat and Web-v2.0 file that are not needed
  3. In the Portal, in the Advanced Web Statistics we add the domain to monitor, witch action corresponds to create a config file awstats.[DOMAIN_NAME].conf for that domain in the folder C:AWStatswwwrootcgi-bin and also insert a command line in the updatestats.bat file for that domain. That's ok. But when we remove the domain from the  Advanced Web Statistics, it does not update the updatestats.bat and eliminate the configuration file.

In regards of configuration, it was more logical to me that the AWStats web site was under Default Web Site on port 80. I redirect the traffic for the main domain of the portal but the awstats web site still responds for the statistics.

Hope to ear from you.

Thanks

Reply
DatatechUK
Posts: 32
Moderator
(@datatechuk)
Member
Joined: 6 years ago

Thanks for the feedback guys.

I have made some changes to the installation script so that the PHP and Python are no longer installed when AWStats is installed from the installation menu and only the required files for security are installed.

I have also changed it so that if the Enterprise Server URL has not been specified at the top of the script prior to running it asks you for that so it is configured in the web.config for AWStats to work.

I have also made a few additional tweaks to improve the speed of the site and some additional security steps.

 

Regarding the Scheduled Task, this should always be located above the wwwroot folder for security, so I would recommend that it is moved if you currently have it in your wwwroot folder, please make sure you amend your scheduled task and configuration for the server in the portal to reflect the required path.
As default the path the installation script uses is "C:AWStatsUpdateStats.bat" as it is at a higher level than the wwwroot folder.

There is an issue we are looking at regarding the Scheduled Tasks, this has been a long-standing issue when creating Scheduled Tasks and getting them to run successfully on Windows Servers and it keeps changing on each version of Windows Server that is released.

 

Thanks for the feedback and please feel free to keep it coming as it is very useful to hear any thoughts or comments on how we can improve things.

Kind regards,
Marc

Reply
briman
Posts: 41
(@briman)
Eminent Member
Joined: 3 years ago

Ok I ran the script and everything seems installed

How do you view the awstats for a website?

Reply
Page 1 / 2
Share: