// only values allowed for https in subdomaines table.
var$httpsmodes=array("http","https","both");
// Slave AlternC instances can know the last reload time thanks to this
var$reloadfile="/run/alternc/apache-reload";
// Where do we find apache template files ?
var$templatedir="/etc/alternc/templates/apache2";
// Where do we store all Apache vhosts ?
var$vhostroot="/var/lib/alternc/apache-vhost/";
// launched before any action by updatedomains
functionhook_updatedomains_web_pre(){
$this->shouldreload=false;
}
// launched for each FQDN for which we want a new vhost template
functionhook_updatedomains_web_add($subdomid){
global$msg,$db;
$db->query("SELECT sd.*, dt.only_dns, dt.has_https_option, m.login FROM domaines_type dt, sub_domaines sd LEFT JOIN membres m ON m.uid=sd.compte WHERE dt.name=sd.type AND sd.web_action!='OK' AND id=?;",array($subdomid));
$db->next_record();
$subdom=$db->Record;
// security : only AlternC account's UIDs
if($subdom["compte"]<1999){
$msg->raise("ERROR","apache","Subdom ".$subdom["id"]." for domain ".$subdom["sub"].".".$subdom["domaine"]." has id ".$subdom["compte"].". Skipped");
$msg->raise("ERROR","apache","Template $template not found for subdom ".$subdom["id"]." for domain ".$subdom["sub"].".".$subdom["domaine"].". Skipped");
$db->query("SELECT sd.*, dt.only_dns, dt.has_https_option, m.login FROM domaines_type dt, sub_domaines sd LEFT JOIN membres m ON m.uid=sd.compte WHERE dt.name=sd.type AND sd.web_action!='OK' AND id=?;",array($subdomid));