Tag Archives: mod_perl

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 [...]
Posted in sysadmin | Also tagged , , , , , | Leave a comment
  • Tags

  • Pages

  • Categories

  • Archives