-
ทดสอบ แม่ 143 algorithms audio bsd centos clock D-Day database download event file freeradius gui health hotspot2 intrepid ISAD itcamp java ldap life link_to linux love ntp project rails review ruby shell sleepless smf solaris ssl sukishi sun sysadmin the mall time ubuntu unix vpn web development
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.
Tags
ทดสอบ แม่ 143 algorithms audio bsd centos clock D-Day database download event file freeradius gui health hotspot2 intrepid ISAD itcamp java ldap life link_to linux love ntp project rails review ruby shell sleepless smf solaris ssl sukishi sun sysadmin the mall time ubuntu unix vpn web development-
Pages
Categories
Archives
HTTPD mod_perl & mod_cgi
1. install mod_perl , mod_cgi
#yum -y install mod_perl mod_cgi
2. edit /etc/httpd/conf/httpd.conf
#vi /etc/httpd/conf/httpd.conf
LoadModule cgi_module modules/mod_cgi.so
LoadModule perl_module modules/mod_perl.so
3. edit /etc/httpd/conf/vhost.conf to handle cgi/perl
#vi /etc/httpd/conf/vhost.conf
<Directory “/path/to/your/perl-script-dir”>
AllowOverride all
DirectoryIndex index.php index.html
Options +ExecCGI
AddHandler cgi-script cgi pl
Order allow,deny
Allow from all
</Directory>
4. reload your httpd server
#service httpd reload
5. test to execute perl script by httpd
#cd /path/to/your/perl-script/dir
#vi test.pl
#!/usr/bin/perl
print “Content-type: text/plain\r\n\r\n”;
print “mod_perl rules!\n”;
6. chmod +x to tes.pl and test to run perl on the shell
#chmod +x test.pl
#perl ./test.pl
Content-type: text/plain
mod_perl rules!
7. go to your browser
http://hostname/path/to/your/perl-script-dir/test.pl
Content-type: text/plain
mod_perl rules!