我正在使用PHP脚本来巧妙地克隆现有的CMS安装。基本上它一切正常,但我想做的下一件事是在apache / ispconfig 2中自动配置新站点的(子)域。我知道ispconfig 3的远程处理能力会更好,但遗憾的是目前不是一个选项,因为“ ISPConfig 3是下一代ISPConfig控制面板,从头开始重写,以支持虚拟用户和多个服务器。 ISPConfig 3 不能用于更新 ISPConfig 2安装。“
有机会用v2 ???
答案 0 :(得分:0)
只需将Apache信息附加到你的httpd.conf:
$data =
<VirtualHost 10.1.2.3:80>
ServerAdmin webmaster@host.example.com
DocumentRoot /www/docs/host.example.com
ServerName host.example.com
ErrorLog logs/host.example.com-error_log
TransferLog logs/host.example.com-access_log
</VirtualHost>
;
file_put_contents('/path/to/filename', $data, FILE_APPEND);
当然,您仍然需要找到一种使用新子域更新DNS的方法。
答案 1 :(得分:0)
我终于发现ispconfig 3提供的“远程处理”也可作为插件使用2。在此处下载和获取更多信息:http://www.ispconfig.org/ispconfig-2/remoting-framework/