Harold
asked on
AWStats in IIS 8.5
Not sure if anyone uses AWStats, but thought I'd ask. We're getting HTTP Error 404.2 - not found.
I've done this. "Make sure the 4.0 items listed in the cgi / isapi restrictions are enabled (allowed)"
The user that is setup for authentication, has Read, Write and Execute to the folder where awstats is located and logs are stored.
I am not a web person, any help is appreciated.
I've done this. "Make sure the 4.0 items listed in the cgi / isapi restrictions are enabled (allowed)"
The user that is setup for authentication, has Read, Write and Execute to the folder where awstats is located and logs are stored.
I am not a web person, any help is appreciated.
ASKER
Sas: ya, Perl is installed and verified. I've looked through this link but didn't really help in this error.
Try to put a simple perl file in the folder and try to browse it.
Will it show it ?
Code :
# Prints the message using two different delimeters.
print "Hello, world!\n";
print qq=Did you say "Hello?"\n=;
Will it show it ?
Code :
# Prints the message using two different delimeters.
print "Hello, world!\n";
print qq=Did you say "Hello?"\n=;
ASKER
Sa: I created a test.pl file, copied the text to it and dropped in this folder domain.com/awstats/cgi-bin /test.pl
I get the same error, attached.
IIS-error-404-2.png
I get the same error, attached.
IIS-error-404-2.png
Try to place it in the root , if same error then this is because PERL is not registered as CGI script :
http://www.howtogeek.com/50479/how-to-install-perl-on-iis-7-for-windows-server-2008/
http://www.howtogeek.com/50479/how-to-install-perl-on-iis-7-for-windows-server-2008/
ASKER
Sas: "place it in the root." ?? Root of the site?
ASKER
Sas: different error. 502
IIS-error-502-2.png
IIS-error-502-2.png
ASKER
Sas: I've had the Handler Mappings assigned too.
PL-CGI-handler-mappings.png
PL-CGI-handler-mappings.png
K, try this sample :
$url = "http://$ENV{SERVER_NAME}$ENV{URL}";
$ip = "$ENV{REMOTE_ADDR}";
print <<ENDOFTEXT;
HTTP/1.0 200 OK
Content-Type: text/html
<HTML>
<HEAD><TITLE>Hello World!</TITLE></HEAD>
<BODY>
<H4>Hello World!</H4>
<P>You have reached <a href="$url">$url</a></P>
<P>Your IP Address is $ip</P>
<H5>Have a nice day!</H5>
</BODY>
</HTML>
ENDOFTEXT
exit(0);
Or try the code suggested in the guide :
Remember to place it in the root of the web site and not in the cgi-bin folder.
#!c:perlbinperl.exe
use strict;
use CGI;
my $test = new CGI;
print $test->header(“text/html”),$test->start_html(“Perl Test”);
print $test->h1(“Perl is working!”);
print $test->end_html;
Remember to place it in the root of the web site and not in the cgi-bin folder.
ASKER
Sas: Tried this and get 502.2 bad gateway. I'm assuming I have to change the path to where Perl.exe exists, correct?
#!C:\Perl64\bin\perl.exe
use strict;
use CGI;
my $test = new CGI;
print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n\n";
print $test->h1(“Perl is working!”);
print $test->end_html;
#!C:\Perl64\bin\perl.exe
use strict;
use CGI;
my $test = new CGI;
print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n\n";
print $test->h1(“Perl is working!”);
print $test->end_html;
ASKER
Sas: even if the OS is 64bit, you use 32 bit?
Please see this article for a detailed debugging explanation :
https://blogs.msdn.microsoft.com/kaushal/2012/02/19/unable-to-browse-a-cgi-application-scripted-in-perl-500-internal-server-error/
https://blogs.msdn.microsoft.com/kaushal/2012/02/19/unable-to-browse-a-cgi-application-scripted-in-perl-500-internal-server-error/
ASKER
Sas: so I removed Perl64. Installed 32bit, pointed handler mappings to the new Perl location, restarted IIS and still get same error, 502.2 bad gateway.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sas: got the following with that could you sent. But the awstats URL still gives 404.2
Hello World!
You have reached http://localhost
Your IP Address is ::1
Have a nice day!
my URL error.....
HTTP Error 404.2 - Not Found
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
Hello World!
You have reached http://localhost
Your IP Address is ::1
Have a nice day!
my URL error.....
HTTP Error 404.2 - Not Found
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
ASKER
Still not sure how to fix this.
http://www.howtogeek.com/50526/setting-up-awstats-on-windows-server-and-iis/
Never used the AWstats but it seems it needs Perl to run.
Did you installed Perl and configured it to run under IIS ? Same article has links to the guide for Perl also.
Regards
George