Are all your sites https? If so this would be a bug. Although there is no reason I can figure why somebody would code it to remove the listen 80 for any reason as that is the core port for any web server. I'll look into the code and check it out.
This is the relevant code to the Listen 80/Listen anything:
So, if you changed the default Apache Service Port (row 80 in DB x_settings) from 80 to anything else (443?), that would cause it to not re-create a Listen 80. This must stay at port 80 and use custom vhost entry port-forwards to use any other ports.
That is the only way I can see it not reproducing the Listen 80.
After even further review, if I am reading this right, this would remove port 80 from the list if any custom ports exist:
I think it should be something like:
Not yet tested.
This is the relevant code to the Listen 80/Listen anything:
Code:
$VHostDefaultPort = ctrl_options::GetSystemOption('apache_port');
$customPorts = array(ctrl_options::GetSystemOption('sentora_port'));
$portQuery = $zdbh->prepare("SELECT vh_custom_port_in FROM x_vhosts WHERE vh_deleted_ts IS NULL");
$portQuery->execute();
while ($rowport = $portQuery->fetch()) {
$customPorts[] = (empty($rowport['vh_custom_port_in'])) ? $VHostDefaultPort : $rowport['vh_custom_port_in'];
}
$customPortList = array_unique($customPorts);
--[snip]--
# NameVirtualHost is still needed for Apache 2.2 but must be removed for apache 2.3
if ((double) sys_versions::ShowApacheVersion() < 2.3) {
foreach ($customPortList as $port) {
$line .= "NameVirtualHost *:" . $port . fs_filehandler::NewLine();
}
}
# Listen is mandatory for each port <> 80 (80 is defined in system config)
foreach ($customPortList as $port) {
$line .= "Listen " . $port . fs_filehandler::NewLine();
}
So, if you changed the default Apache Service Port (row 80 in DB x_settings) from 80 to anything else (443?), that would cause it to not re-create a Listen 80. This must stay at port 80 and use custom vhost entry port-forwards to use any other ports.
That is the only way I can see it not reproducing the Listen 80.
After even further review, if I am reading this right, this would remove port 80 from the list if any custom ports exist:
Code:
while ($rowport = $portQuery->fetch()) {
$customPorts[] = (empty($rowport['vh_custom_port_in'])) ? $VHostDefaultPort : $rowport['vh_custom_port_in'];
}
$customPortList = array_unique($customPorts);
I think it should be something like:
Code:
while ($rowport = $portQuery->fetch()) {
$customPorts[] = (empty($rowport['vh_custom_port_in'])) ? $VHostDefaultPort : $rowport['vh_custom_port_in'];
}
$customPorts = array_push($customPorts, $VHostDefaultPort); // Adds the default Apache Port
$customPortList = array_unique($customPorts);