Hello everybody!
I am doing a wizard to create sites and ftp users and I am having issues with the creation of the web domain.
I create using the ispconfig3 functions a client (client_add), a web_domain (sites_web_domain_add) and a ftp user (sites_ftp_user_add) and all of them are listed on the ISPConfig Panel administration.
The problem is that the web domain doesn't work until I go to the panel edit and save it again (without change anything), I think that is something I am not configuring ok on the params or maybe there is another function resync or refresh that I should call.
The params are:
PHP Code:
$default_website_params = array(
'ip_address' => '',
'domain' => $domain,
'type' => 'vhost',
'parent_domain_id' => 0,
'vhost_type' => 'name',
'hd_quota' => 100,
'traffic_quota' => 4000,
'cgi' => 'n',
'ssi' => 'n',
'suexec' => 'n',
'errordocs' => 1,
'is_subdomainwww' => 1,
'subdomain' => 'none',
'php' => 'mod',
'ruby' => 'n',
'redirect_type' => '',
'redirect_path' => '',
'ssl' => 'n',
'ssl_state' => '',
'ssl_locality' => '',
'ssl_organisation' => '',
'ssl_organisation_unit' => '',
'ssl_country' => 'ES',
'ssl_domain' => $domain,
'ssl_request' => '',
'ssl_cert' => '',
'ssl_bundle' => '',
'ssl_action' => '',
'stats_password' => '',
'stats_type' => 'webalizer',
'allow_override' => 'All',
'apache_directives' => '<Directory /var/www/comunes>'.chr(13).' Order allow,deny'.chr(13).' Allow from all'.chr(13).' </Directory> ',
// 'php_open_basedir' => '/var/www/comunes',
'custom_php_ini' => '',
'backup_interval' => 'none',
'backup_copies' => 1,
'active' => 'y',
'traffic_quota_lock' => 'n'
);
In this way, the web domain is on the ispconfig panel and if i open it and save it works... but it is not what i want.
Other thing I have tried is to set the ip_address to * because it is an * in other domain I have but then I get the error: Error 101 (net::ERR_CONNECTION_RESET).
The code I use to create the web domain is in a function of a class i did:
PHP Code:
public function addWebSite($clientid, $params) {
$params['server_id'] = $this->server_id;
utf8_encode_array($params,'utf8_decode_array');
try {
return $this->soapClient->sites_web_domain_add($this->session_id, $clientid, $params, $readonly = false);
} catch (SoapFault $e) {
throw new IspcfgException($e->getMessage(), 500);
} catch (Exception $e) {
throw new IspcfgException($e->getMessage(), 500);
}
}
Thank you very much in advance!
Recent comments
12 hours 54 min ago
17 hours 53 min ago
19 hours 19 min ago
20 hours 12 min ago
21 hours 55 min ago
1 day 2 hours ago
1 day 3 hours ago
1 day 5 hours ago
1 day 18 hours ago
1 day 20 hours ago