关于apache:ISPConfig SOAP远程API添加启用了php的Web域

ISPConfig SOAP Remote API add web domain with php enabled

我正在使用ispconfig的远程API创建一个ispconfig用户,一个网站和一个ftp用户,并且一切正常,它创建了ispconfig用户,网站和ftp用户,我可以通过ISPConfig和FTP访问它们,并且 该网站也可以正常工作,但是即使我在参数上将其激活,它也不会启用PHP。

这是必要的代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$domain = 'domain.example.com';
$params = array(
        'domain' => $domain,
        'ip_address' => '',
        'type' => 'vhost',
        'parent_domain_id' => 0,
        'vhost_type' => '',
        'hd_quota' => 100,
        'traffic_quota' => 4000,
        'cgi' => 'n',
        'ssi' => 'n',
        'suexec' => 'n',
        'errordocs' => 1,
        'is_subdomainwww' => 1,
        'subdomain' => '',
        'php' => 'y', /* This is activated but it does nothing*/
        'ruby' => 'y', /*This is also activated and works*/
        'redirect_type' => '',
        'redirect_path' => '',
        'ssl' => 'n',
        'ssl_state' => '',
        'ssl_locality' => '',
        'ssl_organisation' => '',
        'ssl_organisation_unit' => '',
        'ssl_country' => '',
        'ssl_domain' => '',
        'ssl_request' => '',
        'ssl_cert' => '',
        'ssl_bundle' => '',
        'ssl_action' => '',
        'stats_password' => '',
        'stats_type' => 'webalizer',
        'allow_override' => 'All',
        'apache_directives' => '',
        'php_open_basedir' => '/',
        'custom_php_ini' => '',
        'backup_interval' => '',
        'backup_copies' => 1,
        'active' => 'y',
        'traffic_quota_lock' => 'n'
);

我认为我不需要在" custom_php_ini"中写任何内容,对吗?

我有一个使用ispconfig的类,创建网站的方法是:

1
2
3
4
5
6
7
8
9
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);
    }
}

在创建ispconfig用户时,我还添加了一个参数''web_php_options'=>'mod',但是它不起作用...

有谁能够帮我? 非常感谢您的提前帮助!

我认为有一个我不知道的参数来指示PHP引擎,但是我找不到正确的文档。


我解决了

当您从网站下载zip时,我正在查看提供的文档,您也可以在此处获得。

如果您查看说明该文档的文档,则说明参数" php"是具有值" n"和" y"的枚举,但适用于ipconfig版本2。在ispconfig3中,您可以编辑php引擎(mod-php,cgi。 ..)不仅启用它。

因此,它可以用$ params编写:

1
 'php' => 'mod',