From 02797d9abc01402ee632b77637cc0b622d432ba3 Mon Sep 17 00:00:00 2001 From: Daniel Reichelt Date: Sat, 24 Sep 2016 21:58:20 +0200 Subject: [PATCH] no longer show NameVirtualHost option for apache 2.4 --- admin_ipsandports.php | 1 + lib/formfields/admin/ipsandports/formfield.ipsandports_add.php | 2 +- lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin_ipsandports.php b/admin_ipsandports.php index f03f6635..eddcf429 100644 --- a/admin_ipsandports.php +++ b/admin_ipsandports.php @@ -33,6 +33,7 @@ if ($page == 'ipsandports' $websrv = Settings::Get('system.webserver'); $is_nginx = ($websrv == 'nginx'); $is_apache = ($websrv == 'apache2'); + $is_apache24 = $is_apache && (Settings::Get('system.apache24') === '1'); if ($action == '') { diff --git a/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php b/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php index 6fa8c3e7..9dd24326 100644 --- a/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php +++ b/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php @@ -49,7 +49,7 @@ return array( 'value' => array('1') ), 'namevirtualhost_statement' => array( - 'visible' => $is_apache, + 'visible' => $is_apache && !$is_apache24, 'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'], 'type' => 'checkbox', 'values' => array( diff --git a/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php b/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php index 5dbea0c3..f52a8230 100644 --- a/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php +++ b/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php @@ -51,7 +51,7 @@ return array( 'value' => array($result['listen_statement']) ), 'namevirtualhost_statement' => array( - 'visible' => $is_apache, + 'visible' => $is_apache && !$is_apache24, 'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'], 'type' => 'checkbox', 'values' => array(