<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> </head> <body> <CENTER>My Web Server</CENTER> <FORM ACTION="http://myserver.loc/cgi-bin/CGI_Test1.pl" METHOD="POST"> <INPUT TYPE="SUBMIT" VALUE="CGI_Test1.pl"></CENTER> </FORM>
myserver.loc </body> </html>
#!/usr/bin/perl -T print "Content-type: text/html\n\n"; print "Hello, World.\n";Save as /var/www/cgi-bin/CGI_Test1.pl
ServerAdmin webmaster@myserver.loc
DocumentRoot /var/www/html
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
AllowOverride None
Options +ExecCGI
AddHandler cgi-script .cgi .pl .php .sh .py
Require all granted
</Directory>
Save it.