<Directory "/data/wwwroot/cgi-bin">
AllowOverride all
Options ExecCgi
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/data/wwwroot/cgi-bin"
3. 设置后缀如.cgi, .pl等等,任意可以想到的
4. 重启apache
print "Content-type: text/html \n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}