Hi,
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?
I have the same problem on Win 2019
Error while opening ‘http://stat.domain/cgi-bin/awstats.pl?config=domain’: The remote server returned an error: (404) Not Found.
windows auth= is Disable
App pool is ApplicationPoolIdentity
Removed Web-v2.0.conf from C:\AWStats
Removed UpdateStats.bat from C:\AWStats
On C:\AWStats\wwwroot\web.config <add key=”AWStats.SolidCPAuthenticationProvider.EnterpriseServer” value=”http://x.x.x.x:9002″ />
DataFolder” value=”C:\AWStats\data”
how can I solve this problem?
Hi, Datatech.
I have change those settings in my config file but it seems not to be my problem.
(I have backslash, but this forum is removing it)
Can you tell me about your configuration.
Are you having only Anonomys access with user IUSR?
What catalogs in Awstat folder do that user have permisson to and type of permissions?
Are you running Perl64?
Regards
Pelle
Hi,
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.
Kind regards,
Marc
- 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
http://mydomain.com/cgi-bin/awstats.pl?config=[domain_name]
Well im total stuck here with 401.
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.
This is my config file.
<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<appSettings>
<!– 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″ />
</appSettings>
<system.web>
<compilation defaultLanguage=”c#” debug=”true” targetFramework=”4.0″ />
<customErrors mode=”RemoteOnly” />
<!– AUTHENTICATION –>
<authentication mode=”Windows”>
<forms name=”.AWSTATSVIEWER” loginUrl=”default.aspx” protection=”All” timeout=”30″ path=”/”>
</forms>
</authentication>
<!– AUTHORIZATION –>
<authorization>
<allow users=”*” />
<!– Allow all users –>
</authorization>
<pages controlRenderingCompatibilityVersion=”3.5″ clientIDMode=”AutoID” /></system.web>
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled=”true” />
</authentication>
</security>
</system.webServer>
</configuration>
Hi,
Same error
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:
Module
CgiModule
Notification
ExecuteRequestHandler
Handler
Perl_Script_Map_PL
Error Code
0x80070005
Requested URL
http://webstat.nwi.se:80/cgi-bin/awstats.pl?config=client80.xxxx.com
Physical Path
C:AWStatswwwrootcgi-binawstats.pl
Logon Method
Anonymous
Logon User
Anonymous