4. Perl

Created Sunday 26 January 2014

http://www.ubuntugeek.com/how-to-install-apache2-webserver-with-phpcgi-and-perl-support-in-ubuntu-server.html
http://www.cgi101.com/learn/connect/mac.html -- code example with Unix-like line endings
http://perl101.org/command-line-switches.html

Install:
sudo apt-get install libapache2-mod-perl2

domain.com apache2 config:
ScriptAlias /cgi-bin/ /home/tbench/public_html/
<Directory /var/vvvhosts/domain.com/public_html/>
Options Indexes +SymLinksIfOwnerMatch MultiViews +ExecCGI
AddHandler cgi-script cgi pl
RewriteEngine on
AllowOverride None
Order deny,allow
allow from 127.0.0.1
</Directory>

Example:
#!/usr/bin/perl -wT
print "Content-type: text/html\n\n";
print "<h2>Hello, World!</h2>\n";



Backlinks: