Windows + Apache + mod_perl + ASP + NET
时间:2009-06-17 来源:brain2007
Windows + Apache + mod_perl + ASP + NET
2008-08-11 by Anngly 版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
本文地址:http://swpu.org/blog/200808/win32-apache-mod-perl-asp.html
Windows xp sp2 (32bit) + Apache 2.2 + Perl(5.10) + mod_perl 2.0 exclusively for examples. (just mark for myself) Install mod_perl via the PPM utility (strongly recommended) 1. Everything is OK, such as Apache, ActiveState Perl. 2. In DOS, input "ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd" Notice: ppm install
http://theoryx5.uwinnipeg.ca/ppms/mod_perl-2.0.ppd
for Apache/2.0 Ensure that the mod_perl version you are using matches that of Apache, make sure you are using at least Apache/2.0.47. read more... 3. Do not care the tips,if it asks the path of mod_perl should be placed. Input the directory such as D:/Apache/modules 4. To enable mod_perl,put in the directives LoadFile "C:/Perl/bin/perl510.dll"
LoadModule perl_module modules/mod_perl.so Alias /modperl/ "D:/modPerlDemo/"
<Location /modperl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
</Location> 5. Restart Apache (Monitor works),or reboot pc. 6. Using ModPerl::Registry to speed up cgi scripts may be done as follows. Create a file, for example, D:/modPerlDemo/modperltest.pl, which will hold your scripts, such as ## 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>"; Install mod_perl via the script 1. Download the script mpinstall and save it as, for example, mpinstall. 2. Invoking this as perl mpinstall on a command line will take you through a dialogue, based on your configuration. see also step 4 above. FAQ for mod_perl on Win32 Apache::ASP Apache::ASP provides an Active Server Pages port to the Apache Web Server with Perl scripting only, so I give up. or Instant ASP ? ASP(vbs) hates paly on Apache(^_^). Building Apache::ASP 2.57 ASP.Net FAQ(about perl&web) Q: I having a problem with a perl script that gathers and emails form data and then returns a Thank You page to the user. The problem may actually be with the browser as it works fine in IE6 and 7 but not in Mozilla firefox. In firefox, the Thank You page is just rendered as HTML code. However, the form data is still sent by email. Any ideas how I can fix this? A:Check the MIME type of the thank you page. If you are outputting, for instance, text/plain , firefox will display it as text/plain. Internet Explorer, on the other hand, often tries to be "helpful" by guessing at the intended output, which is presumably text/html here.
Look for this line (or something like it) in your script:
print ("Content-type: text/html\n\n"); >>to be continued... client denied by server configuration apache 403 denied
修改apache的配置文件,httpd.conf <Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
2008-08-11 by Anngly 版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
本文地址:http://swpu.org/blog/200808/win32-apache-mod-perl-asp.html
Windows xp sp2 (32bit) + Apache 2.2 + Perl(5.10) + mod_perl 2.0 exclusively for examples. (just mark for myself) Install mod_perl via the PPM utility (strongly recommended) 1. Everything is OK, such as Apache, ActiveState Perl. 2. In DOS, input "ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd" Notice: ppm install
http://theoryx5.uwinnipeg.ca/ppms/mod_perl-2.0.ppd
for Apache/2.0 Ensure that the mod_perl version you are using matches that of Apache, make sure you are using at least Apache/2.0.47. read more... 3. Do not care the tips,if it asks the path of mod_perl should be placed. Input the directory such as D:/Apache/modules 4. To enable mod_perl,put in the directives LoadFile "C:/Perl/bin/perl510.dll"
LoadModule perl_module modules/mod_perl.so Alias /modperl/ "D:/modPerlDemo/"
<Location /modperl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
</Location> 5. Restart Apache (Monitor works),or reboot pc. 6. Using ModPerl::Registry to speed up cgi scripts may be done as follows. Create a file, for example, D:/modPerlDemo/modperltest.pl, which will hold your scripts, such as ## 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>"; Install mod_perl via the script 1. Download the script mpinstall and save it as, for example, mpinstall. 2. Invoking this as perl mpinstall on a command line will take you through a dialogue, based on your configuration. see also step 4 above. FAQ for mod_perl on Win32 Apache::ASP Apache::ASP provides an Active Server Pages port to the Apache Web Server with Perl scripting only, so I give up. or Instant ASP ? ASP(vbs) hates paly on Apache(^_^). Building Apache::ASP 2.57 ASP.Net FAQ(about perl&web) Q: I having a problem with a perl script that gathers and emails form data and then returns a Thank You page to the user. The problem may actually be with the browser as it works fine in IE6 and 7 but not in Mozilla firefox. In firefox, the Thank You page is just rendered as HTML code. However, the form data is still sent by email. Any ideas how I can fix this? A:Check the MIME type of the thank you page. If you are outputting, for instance, text/plain , firefox will display it as text/plain. Internet Explorer, on the other hand, often tries to be "helpful" by guessing at the intended output, which is presumably text/html here.
Look for this line (or something like it) in your script:
print ("Content-type: text/html\n\n"); >>to be continued... client denied by server configuration apache 403 denied
修改apache的配置文件,httpd.conf <Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
相关阅读 更多 +
排行榜 更多 +