#!/usr/bin/perl my $dir = "/var/www/vhosts/". $ARGV[0]."/conf"; my $data_file = $dir .'/'.'vhost.conf'; print "adding php5 support for ". $ARGV[0]."\n"; $fc = "AddHandler fcgid-script .php .php5 \n"; $fc.= "\n"; $fc.=" FCGIWrapper /opt/php51/cgi-bin/php5 .php\n"; $fc.=" FCGIWrapper /opt/php51/cgi-bin/php5 .php5\n"; $fc.=" Options ExecCGI\n"; $fc.=" allow from all\n"; $fc.="\n"; open DATA, ">$data_file" or die "can't open $data_file $!"; print DATA $fc; print " vhost file added at $dir.\n"; print " dont forget to set fastCGI in PLESK control panel for this domain\n"; print " --RESTARTING APACHE--\n"; system("apachectl -k restart");