Configuring the Apache Web Server to Run Perl 在Apache中运行Perl

Categories: Development Notes; Tagged with: ; @ May 5th, 2012 16:22

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

XAMPP下修改Apache的Timeout

Categories: PHP; Tagged with: ; @ September 9th, 2010 9:30

本以为是在httpd.conf中可直接修改TimeOut, 但未在该文件中发现该参数. 但有很多Include:

# Various default settings
Include conf/extra/httpd-default.conf

果然, 修改/extra/httpd-default.conf即可.

Linux下Apache安装及配置

Categories: Linux; Tagged with: ; @ August 5th, 2010 21:34

Apache yum安装, httpd.conf配置, Service操作
image

(more…)



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.