client denied by server configuration: C:/Apache2

--000e0cd209d0986df6046786fb09
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I have saved the following file C:\Program Files\Apache Software
Foundation\Apache2.2\Perl\printenv.cgi

# printenv -- demo CGI program which just prints its environment

use strict;
print "Content-type: text/html\n\n";
print "<HTML><BODY><H3>Environment variables</H3><UL>";
foreach (sort keys %ENV) {
my $val = $ENV{$_};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "<LI>$_ = \"${val}\"</LI>\n";
}
#sleep(10);
print "</UL></BODY></HTML>";

and put the following code in httpd.conf

#Alias /perl/ "/Apache2/perl/"
Alias /perl/ "C:/Program Files/Apache Software Foundation/Apache2.2/perl/"
<Location /perl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
</Location>


But it gives the error 403 in browser and in log

client denied by server configuration: C:/Apache2

--000e0cd209d0986df6046786fb09
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>I have saved=A0the following=A0file C:\Program Files\Apache Software Fou=
ndation\Apache2.2\Perl\printenv.cgi</p>
<p>#=A0 printenv -- demo CGI program which just prints its environment<br>=
=A0=A0<br>=A0 use strict;<br>=A0 print "Content-type: text/html\n\n&qu=
ot;;<br>=A0 print "<HTML><BODY><H3>Environment varia=
bles</H3><UL>";<br>
=A0 foreach (sort keys %ENV) {<br>=A0=A0=A0 my $val =3D $ENV{$_};<br>=A0=A0=
=A0 $val =3D~ s|\n|\\n|g;<br>=A0=A0=A0 $val =3D~ s|"|\\"|g;<br>=
=A0=A0=A0 print "<LI>$_ =3D \"${val}\"</LI>\n&qu=
ot;;<br>=A0 }<br>=A0 #sleep(10);<br>
=A0 print "</UL></BODY></HTML>";</p>
<p>and put the following code in httpd.conf</p>
<p>#Alias /perl/ "/Apache2/perl/"<br>=A0Alias /perl/ "C:/Pro=
gram Files/Apache Software Foundation/Apache2.2/perl/"<br>=A0 <Loca=
tion /perl><br>=A0=A0=A0=A0 SetHandler perl-script<br>=A0=A0=A0=A0 PerlR=
esponseHandler ModPerl::Registry<br>
=A0=A0=A0=A0 Options +ExecCGI<br>=A0=A0=A0=A0 PerlOptions +ParseHeaders<br>=
=A0 </Location></p>
<p><br>But it gives the error 403 in browser and in log </p>
<p>client denied by server configuration: C:/Apache2</p>
<p><br>=A0</p>

--000e0cd209d0986df6046786fb09--
sandhya pawar [ Di, 14 April 2009 19:15 ] [ ID #1997631 ]

Re: client denied by server configuration: C:/Apache2

On Tue, Apr 14, 2009 at 12:15 PM, sandhya pawar
<sandhya.pawar03 [at] gmail.com> wrote:
> I have saved=A0the following=A0file C:\Program Files\Apache Software
> Foundation\Apache2.2\Perl\printenv.cgi
[ ... ]
> and put the following code in httpd.conf
>
> #Alias /perl/ "/Apache2/perl/"
> =A0Alias /perl/ "C:/Program Files/Apache Software Foundation/Apache2.2/pe=
rl/"
> =A0 <Location /perl>
> =A0=A0=A0=A0 SetHandler perl-script
> =A0=A0=A0=A0 PerlResponseHandler ModPerl::Registry
> =A0=A0=A0=A0 Options +ExecCGI
> =A0=A0=A0=A0 PerlOptions +ParseHeaders
> =A0 </Location>
>
> But it gives the error 403 in browser and in log
>
> client denied by server configuration: C:/Apache2

That error indicates that there's a reference to C:\Apache2 somewhere
in your httpd.conf that you didn't include in the above snippet. If
there is such a reference, and you don't use it, try commenting it
out, as in the first line you included above:
# Alias /perl/ "/Apache2/perl/"

--
best regards,
Randy
Randy Kobes [ Di, 14 April 2009 20:12 ] [ ID #1997636 ]
Webserver » gmane.comp.apache.mod-perl » client denied by server configuration: C:/Apache2

Vorheriges Thema: Compilation problem
Nächstes Thema: mod_perl conf test