I have installed Awstat with your latest scrip 1.1.1 on a new windows 2016 server.
Everything seems Ok, Perl is working etc but if i trying to login from the default page i get
Error while opening ‘http://My server IP /cgi-bin/awstats.pl?config=mydomain.se’: The remote server returned an error: (401) Unauthorized.
Or when i click on the button in the user i get Unauthorized to.
This is something with Security setting for the account that runs under AWstat server now it is IUSR (The script generated that) under Authentication/Anonymous Authentication
(I tested to set the administrator account there and then i could login without problem just to see that it was not anything else that made the problem)
Any tip about getting this working?
We have only tested the script on Server 2012 R2 for installation purposes, but ti should work perfectly fine on Server 2016.
I am just setting up a new enviroment to do the final tests on some additional bits we are adding to the PowerShell script, i will double check the AwStats part to make sure it is working as required, but this will be on Server 2012 R2.
Did you reboot the server after running the script?
Yes, i have rebooted the server, i have tested the script both on a singelserver installation and in a multiserver setup and its the same behavior.
I have tested to set diffrent users read rights like everyone etc on the catalog wwwroot in awstat but that did not help anything, i tested to set Application pool anonymys access and that did not help either.
HTTP Error 401.3 – Unauthorized
You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.
Detailed Error Information:
This is my config file.
<?xml version=”1.0″ encoding=”UTF-8″?>
<!– AWStats Viewer Settings –>
<add key=”AWStats.URL” value=”/cgi-bin/awstats.pl” />
<add key=”AWStats.Username” value=”” />
<add key=”AWStats.Password” value=”” />
<!– Messages –>
<add key=”AWStats.Message.DomainNotFound” value=”Advanced statistics is not enabled for the specified domain. Login to control panel, open ‘My Resources -> Advanced Statistics’ page and add a new statistics site.” />
<add key=”AWStats.Message.WrongUsername” value=”Account with the specified username does not exist! Make sure you type correct Control Panel username/password.” />
<add key=”AWStats.Message.WrongPassword” value=”Incorrect password has been specified!” />
<!– Authentication provider –>
<add key=”AWStats.AuthenticationProvider” value=”SolidCP.AWStats.Viewer.SolidCPAuthenticationProvider, SolidCP.AWStats.Viewer” />
<!– ConfigFileAuthenticationProvider settings –>
<add key=”AWStats.ConfigFileAuthenticationProvider.DataFolder” value=”c:AWStatsdata” />
<!– SolidCPAuthenticationProvider settings –>
<add key=”AWStats.SolidCPAuthenticationProvider.EnterpriseServer” value=”http://192.XXX.XXX.1:9002″ />
<compilation defaultLanguage=”c#” debug=”true” targetFramework=”4.0″ />
<customErrors mode=”RemoteOnly” />
<!– AUTHENTICATION –>
<forms name=”.AWSTATSVIEWER” loginUrl=”default.aspx” protection=”All” timeout=”30″ path=”/”>
<!– AUTHORIZATION –>
<allow users=”*” />
<!– Allow all users –>
<pages controlRenderingCompatibilityVersion=”3.5″ clientIDMode=”AutoID” /></system.web>
<windowsAuthentication enabled=”true” />
Well with that error i would check 2 things:
- i see you got windows auth enabled – You can’t (or shouldn’t) really have that together with anonymous auth (so normally you leave it disabled)
- your anonymous auth: what username does it use? and does that user have permissions to your directory? (if it uses application pool identity –> check the application pool user)
As the error generally just indicates a lack of permission of the user IIS is using.
- I have turned that off.
Your script is setting IUSR but that dosent work. (Even if that user have permission in folder)
If i put user application pool identity and add this user full control on the whole mapp c:AWStats
Same result. 401
There is a application pool user SolidCP Awstats .NET v4 (from script)
That Application pool Identity is the same result 401
If i set the user Administrator then i can klick from inside SolidCP and view statistic (This is probably it dosent even try to login to solidcp) but i cant login if i going to the default startpage of Awstats with doman, user , password.(If i write something wrong then it says so, but if its correct its just like a reload off page)
This is some other things that wasent correct from standard installation
Your script is installing Perl64 and the catalog is c:Perl64 insted of just c:Perl
And i have changed that in SolidCP.
And another thing is that the log files of IIS is starting with u_ex and not ex
I have change that to.
And Statistics Help URL: i have removed “/Awstat” catalog so now its pointing like this
Well im total stuck here with 401.
I have spun up a Server 2016 Virtal Machine and all looks fine, but i have noticed that 2 values were not set in theweb.config file.
Culd you open the C:AWStatswwwrootweb.config file and change the following nodes:-
<add key=”AWStats.ConfigFileAuthenticationProvider.DataFolder” value=”~/cgi-bin”/>
<add key=”AWStats.SolidCPAuthenticationProvider.EnterpriseServer” value=”http://localhost/EnterpriseServer”/>
The DataFolder needs to be C:/AWStats/data – (Replace the ForwardSlash with BackSlash)
The EnterpriseServer needs to be the URL of your Enterprise Server (including port), I.E. this would be something like http://192.168.0.1:9002
Please try the above and let me know hw you get on as i have just written this into the latest version of the script which i will be releasing tomorrow after some more testing.
- Views17167 times
- Answers13 answers