1. Install Perl
2. Install Apache & config httpd:
Options Indexes FollowSymLinks
Add ExecCGI to this line. The line should now look like the following:
Options Indexes FollowSymLinks ExecCGI
Next, search for the following:
#AddHandler cgi-script .cgi
Uncomment this line by removing the # in front of the line, and add a .pl to the end of the line. The new line should look like this:
AddHandler cgi-script .cgi .pl
3. Start the server, and check the server environment:
http://localhost:8080/cgi-bin/printenv.pl
There should be some environment variables like DOCUMENT_ROOT/PATH/SCRIPT_FILENAME….
4. Drop a Perl(hello.pl) into the server:
#!D:/perl/bin/perl.exe
print "Content-type: text/html; charset=utf-8\n\n";
print "<phtml><head><title>Learning Perl</title></head><body>";
print "<h1>PerlPage</h1>";
print "<form action='upload.pl' method='post'>";
print "<input type=file name=='file'>";
print "<input type=text name='comment' size=20 value=''>";
print "<input type=submit name=enter value='Upload'>";
print "<form>";
print "</body></html>";
you can just drop this file in your ApacheHome/cgi-bin or your site if you have configured the httpd.conf;
5. check the Perl page:
http://localhost:8080/cgi-bin/hello.pl
Ref:http://www.editrocket.com/articles/perl_apache_windows.html
本以为是在httpd.conf中可直接修改TimeOut, 但未在该文件中发现该参数. 但有很多Include:
# Various default settings
Include conf/extra/httpd-default.conf
果然, 修改/extra/httpd-default.conf即可.
Apache yum安装, httpd.conf配置, Service操作
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.