PHP Code:
$params_website = array('server_id' => 1,
'ip_address' => '*',
'domain' => $myusername.'.remcycle.net',
'type' => 'vhost',
'parent_domain_id' => '',
'vhost_type' => 'name',
'hd_quota' => 999999,
'traffic_quota' => '1000',
'cgi' =>'y',
'ssi' =>'y',
'suexec' =>'y',
'errordocs' =>'1',
'subdomain' =>'www',
'ssl' =>'n',
'php' =>"mod",
'ruby' =>'y',
'active' =>'y',
'redirect_type' =>'no',
'redirect_path' =>'',
'ssl_state' =>'',
'ssl_organisation' =>'',
'ssl_organisation_unit' =>'',
'ssl_country' =>'',
'ssl_domain' => $myusername.'.remcycle.net',
'ssl_request' =>'',
'ssl_cert' =>'',
'ssl_bundle' =>'',
'ssl_action' =>'',
//'stats_password' =>$mypassword,
'stats_password' =>'',
'stats_type' =>'webalizer',
'backup_interval' =>'daily',
'backup_copies' =>'7',
'document_root' =>'/var/www/clients/client'.$client_id.'/web'.$domain_id,
'system_user' =>'web'.$domain_id,
'system_group' =>'client'.$client_id,
'allow_override' =>'All',
'php_open_basedir' =>'/var/www/clients/client'.$client_id.'/web'.$domain_id.'/web:/var/www/clients/client'.$client_id.'/web'.$domain_id.'/tmp:/var/www/'. $myusername.'.remcycle.net/web:/srv/www/'.$myusername.'.remcycle.net/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin',
'custom_php_ini' =>'',
'apache_directives' => '<Directory />
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>',
'client_group_id' =>$client_id +1
);
$website_id = $client->sites_web_domain_add($session_id, $client_id, $params_website);