... | ... |
@@ -159,7 +159,7 @@ if (count($vhosts) > 0) { |
159 | 159 |
$php_default_version = $v['major'].'.'.$v['minor']; |
160 | 160 |
} |
161 | 161 |
} |
162 |
- $php = icon_enabled('PHP in der neuesten stabilen Version eingeschaltet ('.$php_default_version.')'); |
|
162 |
+ $php = icon_enabled('PHP in der empfohlenen Version eingeschaltet ('.$php_default_version.')'); |
|
163 | 163 |
} elseif (array_key_exists($php, $phpinfo)) { |
164 | 164 |
$phpinfo = $phpinfo[$php]; |
165 | 165 |
/* To create new PHP icon: |
... | ... |
@@ -152,7 +152,15 @@ if (count($vhosts) > 0) { |
152 | 152 |
} else { |
153 | 153 |
$php = $vhost['php']; |
154 | 154 |
$phpinfo = valid_php_versions($php); |
155 |
- if (array_key_exists($php, $phpinfo)) { |
|
155 |
+ if ($php == 'default') { |
|
156 |
+ $php_default_version = null; |
|
157 |
+ foreach ($phpinfo as $v) { |
|
158 |
+ if ($v['default'] == true) { |
|
159 |
+ $php_default_version = $v['major'].'.'.$v['minor']; |
|
160 |
+ } |
|
161 |
+ } |
|
162 |
+ $php = icon_enabled('PHP in der neuesten stabilen Version eingeschaltet ('.$php_default_version.')'); |
|
163 |
+ } elseif (array_key_exists($php, $phpinfo)) { |
|
156 | 164 |
$phpinfo = $phpinfo[$php]; |
157 | 165 |
/* To create new PHP icon: |
158 | 166 |
convert ok.png -gravity center -draw "text 0,0 '7.2'" ok-php72.png |
... | ... |
@@ -37,7 +37,7 @@ output("<p>Mit dieser Funktion legen Sie fest, welche Websites verfügbar sein s |
37 | 37 |
|
38 | 38 |
$filter = ""; |
39 | 39 |
if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') { |
40 |
- $filter = filter_input_general($_REQUEST['filter']); |
|
40 |
+ $filter = $_REQUEST['filter']; |
|
41 | 41 |
} |
42 | 42 |
$vhosts = list_vhosts($filter); |
43 | 43 |
|
... | ... |
@@ -51,7 +51,7 @@ foreach ($vhosts as $vh) { |
51 | 51 |
} |
52 | 52 |
// Filter-Funktion |
53 | 53 |
if (count($vhosts) > 10 || $filter) { |
54 |
- $form = '<p><label for="filter">Filter für die Anzeige:</label> <input type="text" name="filter" id="filter" value="'.$filter.'"><button type="button" id="clear" title="Filter leeren">×</button><input type="submit" value="Filtern!"></p>'; |
|
54 |
+ $form = '<p><label for="filter">Filter für die Anzeige:</label> <input type="text" name="filter" id="filter" value="'.filter_output_html($filter).'"><button type="button" id="clear" title="Filter leeren">×</button><input type="submit" value="Filtern!"></p>'; |
|
55 | 55 |
output(html_form('vhosts_filter', 'vhosts', '', $form)); |
56 | 56 |
} |
57 | 57 |
|
... | ... |
@@ -109,8 +109,6 @@ if (count($vhosts) > 0) { |
109 | 109 |
$logfiles .= ' + Fehler'; |
110 | 110 |
} |
111 | 111 |
} |
112 |
- $stats = $vhost['stats'] ? internal_link("showstats", other_icon("chart_bar.png", "Statistiken anzeigen"), "vhost={$vhost['id']}").' ' : ''; |
|
113 |
- output("<td>{$stats}{$logfiles}</td>"); |
|
114 | 112 |
|
115 | 113 |
if ($vhost['ssl'] == 'http') { |
116 | 114 |
output("<td>".icon_disabled('HTTPS ausgeschaltet')."</td>"); |
... | ... |
@@ -23,14 +23,14 @@ javascript(); |
23 | 23 |
|
24 | 24 |
require_once('vhosts.php'); |
25 | 25 |
|
26 |
-title("Subdomains"); |
|
26 |
+title("Websites"); |
|
27 | 27 |
$error = ''; |
28 | 28 |
|
29 | 29 |
require_role(ROLE_SYSTEMUSER); |
30 | 30 |
|
31 | 31 |
global $prefix; |
32 | 32 |
|
33 |
-output("<p>Mit dieser Funktion legen Sie fest, welche Domains und Subdomains als Webserver-Ressource verfügbar sein sollen und welches Verzeichnis die Dateien enthalten soll.</p> |
|
33 |
+output("<p>Mit dieser Funktion legen Sie fest, welche Websites verfügbar sein sollen und welches Verzeichnis die Dateien enthalten soll.</p> |
|
34 | 34 |
<p>Änderungen an Ihren Einstellungen werden im 5-Minuten-Takt auf dem Server übernommen.</p> |
35 | 35 |
"); |
36 | 36 |
|
... | ... |
@@ -63,9 +63,9 @@ if (count($vhosts) > 0) { |
63 | 63 |
} |
64 | 64 |
*/ |
65 | 65 |
if (count($vhosts) > 10) { |
66 |
- addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
|
66 |
+ addnew('edit', 'Neue Website einrichten'); |
|
67 | 67 |
} |
68 |
- output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>HTTPS</th><th>Traffic<sup>*</sup></th><th>PHP</th><th>Lokaler Pfad<sup>**</sup></th></tr>\n"); |
|
68 |
+ output("<table><tr><th>Haupt-Adresse</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>HTTPS</th><th>Traffic<sup>*</sup></th><th>PHP</th><th>Lokaler Pfad<sup>**</sup></th></tr>\n"); |
|
69 | 69 |
|
70 | 70 |
$even = true; |
71 | 71 |
|
... | ... |
@@ -188,10 +188,10 @@ if (count($vhosts) > 0) { |
188 | 188 |
} elseif ($filter) { |
189 | 189 |
output("<p><strong><em>Keine Einträge für Ihre aktuellen Filterkrieterien.</em></strong></p>"); |
190 | 190 |
} else { // keine VHosts vorhanden |
191 |
- output("<p><strong><em>Bisher haben Sie keine Domain bzw. Subdomain eingerichtet.</em></strong></p>"); |
|
191 |
+ output("<p><strong><em>Bisher haben Sie keine Website eingerichtet.</em></strong></p>"); |
|
192 | 192 |
} |
193 | 193 |
|
194 |
-addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
|
194 |
+addnew('edit', 'Neue Website einrichten'); |
|
195 | 195 |
|
196 | 196 |
output('<p>Bei passenden Einstellungen wird für jede Ihrer Websites automatisch ein Zertifikat von Let\'s Encrypt verwaltet und regelmäßig erneuert. Wenn Sie ein Zertifikat einsetzen möchten, das von einer anderen Zertifizierungsstelle ausgestellt ist, können Sie dieses hier hochladen.</p>'); |
197 | 197 |
addnew('newcert', 'Ein eigenes HTTPS-Zertifikat eintragen'); |
... | ... |
@@ -160,6 +160,8 @@ if (count($vhosts) > 0) { |
160 | 160 |
$php = icon_enabled_phpxx('PHP in Version '.$phpinfo['major'].'.'.$phpinfo['minor'].' eingeschaltet', $phpinfo['major'], $phpinfo['minor']); |
161 | 161 |
if ($phpinfo['status'] == 'deprecated') { |
162 | 162 |
$php .= ' '.icon_warning('Diese PHP-Version ist veraltet!'); |
163 |
+ } elseif ($phpinfo['status'] == 'used') { |
|
164 |
+ $php .= ' '.icon_warning('Diese PHP-Version hat für Sie aktuell nur noch Bestandsschutz'); |
|
163 | 165 |
} |
164 | 166 |
} else { |
165 | 167 |
$php = icon_disabled('PHP ausgeschaltet'); |
... | ... |
@@ -151,26 +151,19 @@ if (count($vhosts) > 0) { |
151 | 151 |
output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Subversion-Server</em></td>'); |
152 | 152 |
} else { |
153 | 153 |
$php = $vhost['php']; |
154 |
- switch ($php) { |
|
155 |
- /* To create new PHP icon: |
|
156 |
- convert ok.png -gravity center -draw "text 0,0 '7.2'" ok-php72.png |
|
157 |
- */ |
|
158 |
- case null: |
|
159 |
- $php = icon_disabled('PHP ausgeschaltet'); |
|
160 |
- break; |
|
161 |
- case 'php56': |
|
162 |
- $php = icon_enabled_phpxx('PHP in Version 5.6 eingeschaltet', 5, 6); |
|
163 |
- break; |
|
164 |
- case 'fpm70': |
|
165 |
- $php = icon_enabled_phpxx('PHP in Version 7.0 eingeschaltet', 7, 0); |
|
166 |
- break; |
|
167 |
- case 'fpm71': |
|
168 |
- $php = icon_enabled_phpxx('PHP in Version 7.1 eingeschaltet', 7, 1); |
|
169 |
- break; |
|
170 |
- case 'fpm72': |
|
171 |
- $php = icon_enabled_phpxx('PHP in Version 7.2 eingeschaltet', 7, 2); |
|
172 |
- break; |
|
173 |
- } |
|
154 |
+ $phpinfo = valid_php_versions($php); |
|
155 |
+ if (array_key_exists($php, $phpinfo)) { |
|
156 |
+ $phpinfo = $phpinfo[$php]; |
|
157 |
+ /* To create new PHP icon: |
|
158 |
+ convert ok.png -gravity center -draw "text 0,0 '7.2'" ok-php72.png |
|
159 |
+ */ |
|
160 |
+ $php = icon_enabled_phpxx('PHP in Version '.$phpinfo['major'].'.'.$phpinfo['minor'].' eingeschaltet', $phpinfo['major'], $phpinfo['minor']); |
|
161 |
+ if ($phpinfo['status'] == 'deprecated') { |
|
162 |
+ $php .= ' '.icon_warning('Diese PHP-Version ist veraltet!'); |
|
163 |
+ } |
|
164 |
+ } else { |
|
165 |
+ $php = icon_disabled('PHP ausgeschaltet'); |
|
166 |
+ } |
|
174 | 167 |
output("<td>{$php}</td>"); |
175 | 168 |
if ($vhost['docroot_is_default'] == 1) { |
176 | 169 |
output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>"); |
... | ... |
@@ -111,7 +111,7 @@ if (count($vhosts) > 0) { |
111 | 111 |
} |
112 | 112 |
$stats = $vhost['stats'] ? internal_link("showstats", other_icon("chart_bar.png", "Statistiken anzeigen"), "vhost={$vhost['id']}").' ' : ''; |
113 | 113 |
output("<td>{$stats}{$logfiles}</td>"); |
114 |
- |
|
114 |
+ |
|
115 | 115 |
if ($vhost['ssl'] == 'http') { |
116 | 116 |
output("<td>".icon_disabled('HTTPS ausgeschaltet')."</td>"); |
117 | 117 |
} elseif (strstr($vhost['options'], "letsencrypt") && $vhost['cert']) { |
... | ... |
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely |
8 | 8 |
|
9 | 9 |
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. |
10 | 10 |
|
11 |
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
11 |
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 | 12 |
http://creativecommons.org/publicdomain/zero/1.0/ |
13 | 13 |
|
14 | 14 |
Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. |
... | ... |
@@ -37,7 +37,7 @@ output("<p>Mit dieser Funktion legen Sie fest, welche Domains und Subdomains als |
37 | 37 |
|
38 | 38 |
$filter = ""; |
39 | 39 |
if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') { |
40 |
- $filter = filter_input_general($_REQUEST['filter']); |
|
40 |
+ $filter = filter_input_general($_REQUEST['filter']); |
|
41 | 41 |
} |
42 | 42 |
$vhosts = list_vhosts($filter); |
43 | 43 |
|
... | ... |
@@ -45,9 +45,9 @@ $vhosts = list_vhosts($filter); |
45 | 45 |
$traffic_sum = 0; |
46 | 46 |
$letsencrypt = false; |
47 | 47 |
foreach ($vhosts as $vh) { |
48 |
- if (strstr($vh['options'], 'letsencrypt')) { |
|
49 |
- $letsencrypt = true; |
|
50 |
- } |
|
48 |
+ if (strstr($vh['options'], 'letsencrypt')) { |
|
49 |
+ $letsencrypt = true; |
|
50 |
+ } |
|
51 | 51 |
} |
52 | 52 |
// Filter-Funktion |
53 | 53 |
if (count($vhosts) > 10 || $filter) { |
... | ... |
@@ -55,120 +55,107 @@ if (count($vhosts) > 10 || $filter) { |
55 | 55 |
output(html_form('vhosts_filter', 'vhosts', '', $form)); |
56 | 56 |
} |
57 | 57 |
|
58 |
-if (count($vhosts) > 0) |
|
59 |
-{ |
|
60 |
- /* |
|
61 |
- if ($letsencrypt) { |
|
62 |
- warning("Sie haben für eine oder mehrere Domains die Nutzung eines Let's-Encrypt-Zertifikats aktiviert. Wir haben diese Funktion nach allgemeiner Verfügbarkeit von Let's Encrypt umgehend freigeschaltet und sind mit der ersten Erfahrungen sehr zufrieden. Dennoch befindet sich Let's Encrypt momentan im Beta-Betrieb (d.h. Testbetrieb). Störungen sind daher nicht auszuschließen."); |
|
63 |
- warning("Die Bereitstellung eines Zertifikats von Let's Encrypt kann momentan bis zu 15 Minuten in Anspruch nehmen."); |
|
64 |
- } |
|
65 |
- */ |
|
66 |
- if (count($vhosts) > 10) { |
|
67 |
- addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
|
68 |
- } |
|
69 |
- output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>HTTPS</th><th>Traffic<sup>*</sup></th><th>PHP</th><th>Lokaler Pfad<sup>**</sup></th></tr>\n"); |
|
70 |
- |
|
71 |
- $even = True; |
|
72 |
- |
|
73 |
- foreach ($vhosts as $vhost) |
|
74 |
- { |
|
75 |
- $even = ! $even; |
|
76 |
- $fqdn = $vhost['fqdn']; |
|
77 |
- $class = 'odd'; |
|
78 |
- if ($even) $class = 'even'; |
|
79 |
- $proto = 'http'; |
|
80 |
- if ($vhost['ssl'] == 'https' || $vhost['ssl'] == 'forward') { |
|
81 |
- $proto = 'https'; |
|
82 |
- } |
|
83 |
- $linkuri = $vhost['fqdn']; |
|
84 |
- if (strstr($vhost['options'], 'aliaswww')) { |
|
85 |
- $linkuri = "www.".$vhost['fqdn']; |
|
86 |
- } |
|
87 |
- output("<tr class=\"{$class}\"><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}", 'title="Einstellungen bearbeiten"')."</td><td><a href=\"{$proto}://{$linkuri}\">".other_icon('world_link.png', 'Website aufrufen')."</a> ".internal_link('save', icon_delete("»{$vhost['fqdn']}« löschen"), 'action=delete&vhost='.$vhost['id'] )."</td><td>"); |
|
88 |
- $aliases = get_all_aliases($vhost); |
|
89 |
- $tmp = ''; |
|
90 |
- if (count($aliases) > 0) |
|
91 |
- { |
|
92 |
- foreach ($aliases as $alias) |
|
93 |
- { |
|
94 |
- $tmp .= $alias['fqdn'].'<br />'; |
|
95 |
- } |
|
96 |
- } else { |
|
97 |
- $tmp = '<em>- keine -</em>'; |
|
98 |
- } |
|
99 |
- output(internal_link('aliases', $tmp, 'vhost='.$vhost['id'], 'title="Aliase verwalten"')); |
|
100 |
- output('</td>'); |
|
101 |
- $logfiles = 'Kein Log'; |
|
102 |
- if ($vhost['logtype'] == 'default') |
|
103 |
- $logfiles = 'Zugriffe '; |
|
104 |
- elseif ($vhost['logtype'] == 'anonymous') |
|
105 |
- $logfiles = 'Anonym'; |
|
106 |
- if ($vhost['errorlog'] == 1) |
|
107 |
- { |
|
108 |
- if ($vhost['logtype'] == NULL) |
|
109 |
- $logfiles = 'Fehler'; |
|
110 |
- else |
|
111 |
- $logfiles .= ' + Fehler'; |
|
112 |
- } |
|
113 |
- $stats = $vhost['stats'] ? internal_link("showstats", other_icon("chart_bar.png", "Statistiken anzeigen"), "vhost={$vhost['id']}").' ' : ''; |
|
114 |
- output("<td>{$stats}{$logfiles}</td>"); |
|
58 |
+if (count($vhosts) > 0) { |
|
59 |
+ /* |
|
60 |
+ if ($letsencrypt) { |
|
61 |
+ warning("Sie haben für eine oder mehrere Domains die Nutzung eines Let's-Encrypt-Zertifikats aktiviert. Wir haben diese Funktion nach allgemeiner Verfügbarkeit von Let's Encrypt umgehend freigeschaltet und sind mit der ersten Erfahrungen sehr zufrieden. Dennoch befindet sich Let's Encrypt momentan im Beta-Betrieb (d.h. Testbetrieb). Störungen sind daher nicht auszuschließen."); |
|
62 |
+ warning("Die Bereitstellung eines Zertifikats von Let's Encrypt kann momentan bis zu 15 Minuten in Anspruch nehmen."); |
|
63 |
+ } |
|
64 |
+ */ |
|
65 |
+ if (count($vhosts) > 10) { |
|
66 |
+ addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
|
67 |
+ } |
|
68 |
+ output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>HTTPS</th><th>Traffic<sup>*</sup></th><th>PHP</th><th>Lokaler Pfad<sup>**</sup></th></tr>\n"); |
|
69 |
+ |
|
70 |
+ $even = true; |
|
71 |
+ |
|
72 |
+ foreach ($vhosts as $vhost) { |
|
73 |
+ $even = ! $even; |
|
74 |
+ $fqdn = $vhost['fqdn']; |
|
75 |
+ $class = 'odd'; |
|
76 |
+ if ($even) { |
|
77 |
+ $class = 'even'; |
|
78 |
+ } |
|
79 |
+ $proto = 'http'; |
|
80 |
+ if ($vhost['ssl'] == 'https' || $vhost['ssl'] == 'forward') { |
|
81 |
+ $proto = 'https'; |
|
82 |
+ } |
|
83 |
+ $linkuri = $vhost['fqdn']; |
|
84 |
+ if (strstr($vhost['options'], 'aliaswww')) { |
|
85 |
+ $linkuri = "www.".$vhost['fqdn']; |
|
86 |
+ } |
|
87 |
+ output("<tr class=\"{$class}\"><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}", 'title="Einstellungen bearbeiten"')."</td><td><a href=\"{$proto}://{$linkuri}\">".other_icon('world_link.png', 'Website aufrufen')."</a> ".internal_link('save', icon_delete("»{$vhost['fqdn']}« löschen"), 'action=delete&vhost='.$vhost['id'])."</td><td>"); |
|
88 |
+ $aliases = get_all_aliases($vhost); |
|
89 |
+ $tmp = ''; |
|
90 |
+ if (count($aliases) > 0) { |
|
91 |
+ foreach ($aliases as $alias) { |
|
92 |
+ $tmp .= $alias['fqdn'].'<br />'; |
|
93 |
+ } |
|
94 |
+ } else { |
|
95 |
+ $tmp = '<em>- keine -</em>'; |
|
96 |
+ } |
|
97 |
+ output(internal_link('aliases', $tmp, 'vhost='.$vhost['id'], 'title="Aliase verwalten"')); |
|
98 |
+ output('</td>'); |
|
99 |
+ $logfiles = 'Kein Log'; |
|
100 |
+ if ($vhost['logtype'] == 'default') { |
|
101 |
+ $logfiles = 'Zugriffe '; |
|
102 |
+ } elseif ($vhost['logtype'] == 'anonymous') { |
|
103 |
+ $logfiles = 'Anonym'; |
|
104 |
+ } |
|
105 |
+ if ($vhost['errorlog'] == 1) { |
|
106 |
+ if ($vhost['logtype'] == null) { |
|
107 |
+ $logfiles = 'Fehler'; |
|
108 |
+ } else { |
|
109 |
+ $logfiles .= ' + Fehler'; |
|
110 |
+ } |
|
111 |
+ } |
|
112 |
+ $stats = $vhost['stats'] ? internal_link("showstats", other_icon("chart_bar.png", "Statistiken anzeigen"), "vhost={$vhost['id']}").' ' : ''; |
|
113 |
+ output("<td>{$stats}{$logfiles}</td>"); |
|
115 | 114 |
|
116 |
- if ($vhost['ssl'] == 'http') |
|
117 |
- { |
|
118 |
- output("<td>".icon_disabled('HTTPS ausgeschaltet')."</td>"); |
|
119 |
- } |
|
120 |
- elseif (strstr($vhost['options'], "letsencrypt") && $vhost['cert']) |
|
121 |
- { |
|
122 |
- $forward = ''; |
|
123 |
- if ($vhost['ssl'] == 'forward') { |
|
124 |
- $forward = " ".other_icon("refresh.png", 'Auf HTTPS umleiten'); |
|
125 |
- } else { |
|
126 |
- $forward = " ".other_icon("warning.png", 'Ungeschützter Aufruf weiterhin möglich'); |
|
127 |
- } |
|
128 |
- output("<td>".other_icon("letsencrypt.png", "Automatische Zertifikatsverwaltung mit Let's Encrypt").$forward."</td>"); |
|
129 |
- } |
|
130 |
- elseif ($vhost['cert']) |
|
131 |
- { |
|
132 |
- output("<td>".other_icon("key.png", "HTTPS mit eigenem Zertifikat")."</td>"); |
|
133 |
- } |
|
134 |
- elseif (strstr($vhost['options'], "letsencrypt")) { |
|
135 |
- // Letsencrypt gewählt aber noch nicht aktiv |
|
136 |
- $message = "Let's Encrypt-Zertifikat ist noch nicht bereit"; |
|
137 |
- output("<td>".other_icon("letsencrypt.png", $message).icon_warning($message)."</td>"); |
|
138 |
- } |
|
139 |
- else |
|
140 |
- { |
|
141 |
- output("<td>".icon_enabled('HTTPS eingeschaltet')."</td>"); |
|
142 |
- } |
|
143 |
- |
|
144 |
- $traffic = traffic_month($vhost['id']); |
|
145 |
- $traffic_sum += (int) $traffic; |
|
146 |
- $traffic_string = $traffic.' MB'; |
|
147 |
- if ($traffic > 1024) { |
|
148 |
- $traffic_string = round($traffic / 1024, 2).' GB'; |
|
149 |
- } |
|
150 |
- if ($traffic === NULL) { |
|
151 |
- $traffic_string = '--'; |
|
152 |
- } |
|
153 |
- output("<td style=\"text-align: right;\">{$traffic_string}</td>"); |
|
154 |
- |
|
155 |
- if ($vhost['is_webapp'] == 1) { |
|
156 |
- output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Vorinstallierte Webanwendung</em></td>'); |
|
157 |
- } |
|
158 |
- elseif ($vhost['is_dav'] == 1) { |
|
159 |
- output('<td colspan="2"><em><strong>Sonderanwendung:</strong> WebDAV</em></td>'); |
|
160 |
- } |
|
161 |
- elseif ($vhost['is_svn'] == 1) { |
|
162 |
- output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Subversion-Server</em></td>'); |
|
163 |
- } |
|
164 |
- else { |
|
165 |
- $php = $vhost['php']; |
|
166 |
- switch ($php) |
|
167 |
- { |
|
115 |
+ if ($vhost['ssl'] == 'http') { |
|
116 |
+ output("<td>".icon_disabled('HTTPS ausgeschaltet')."</td>"); |
|
117 |
+ } elseif (strstr($vhost['options'], "letsencrypt") && $vhost['cert']) { |
|
118 |
+ $forward = ''; |
|
119 |
+ if ($vhost['ssl'] == 'forward') { |
|
120 |
+ $forward = " ".other_icon("refresh.png", 'Auf HTTPS umleiten'); |
|
121 |
+ } else { |
|
122 |
+ $forward = " ".other_icon("warning.png", 'Ungeschützter Aufruf weiterhin möglich'); |
|
123 |
+ } |
|
124 |
+ output("<td>".other_icon("letsencrypt.png", "Automatische Zertifikatsverwaltung mit Let's Encrypt").$forward."</td>"); |
|
125 |
+ } elseif ($vhost['cert']) { |
|
126 |
+ output("<td>".other_icon("key.png", "HTTPS mit eigenem Zertifikat")."</td>"); |
|
127 |
+ } elseif (strstr($vhost['options'], "letsencrypt")) { |
|
128 |
+ // Letsencrypt gewählt aber noch nicht aktiv |
|
129 |
+ $message = "Let's Encrypt-Zertifikat ist noch nicht bereit"; |
|
130 |
+ output("<td>".other_icon("letsencrypt.png", $message).icon_warning($message)."</td>"); |
|
131 |
+ } else { |
|
132 |
+ output("<td>".icon_enabled('HTTPS eingeschaltet')."</td>"); |
|
133 |
+ } |
|
134 |
+ |
|
135 |
+ $traffic = traffic_month($vhost['id']); |
|
136 |
+ $traffic_sum += (int) $traffic; |
|
137 |
+ $traffic_string = $traffic.' MB'; |
|
138 |
+ if ($traffic > 1024) { |
|
139 |
+ $traffic_string = round($traffic / 1024, 2).' GB'; |
|
140 |
+ } |
|
141 |
+ if ($traffic === null) { |
|
142 |
+ $traffic_string = '--'; |
|
143 |
+ } |
|
144 |
+ output("<td style=\"text-align: right;\">{$traffic_string}</td>"); |
|
145 |
+ |
|
146 |
+ if ($vhost['is_webapp'] == 1) { |
|
147 |
+ output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Vorinstallierte Webanwendung</em></td>'); |
|
148 |
+ } elseif ($vhost['is_dav'] == 1) { |
|
149 |
+ output('<td colspan="2"><em><strong>Sonderanwendung:</strong> WebDAV</em></td>'); |
|
150 |
+ } elseif ($vhost['is_svn'] == 1) { |
|
151 |
+ output('<td colspan="2"><em><strong>Sonderanwendung:</strong> Subversion-Server</em></td>'); |
|
152 |
+ } else { |
|
153 |
+ $php = $vhost['php']; |
|
154 |
+ switch ($php) { |
|
168 | 155 |
/* To create new PHP icon: |
169 | 156 |
convert ok.png -gravity center -draw "text 0,0 '7.2'" ok-php72.png |
170 | 157 |
*/ |
171 |
- case NULL: |
|
158 |
+ case null: |
|
172 | 159 |
$php = icon_disabled('PHP ausgeschaltet'); |
173 | 160 |
break; |
174 | 161 |
case 'php56': |
... | ... |
@@ -184,36 +171,32 @@ if (count($vhosts) > 0) |
184 | 171 |
$php = icon_enabled_phpxx('PHP in Version 7.2 eingeschaltet', 7, 2); |
185 | 172 |
break; |
186 | 173 |
} |
187 |
- output("<td>{$php}</td>"); |
|
188 |
- if ($vhost['docroot_is_default'] == 1) |
|
189 |
- output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>"); |
|
190 |
- else |
|
191 |
- output("<td><strong>{$vhost['docroot']}</strong></td>"); |
|
192 |
- } |
|
193 |
- output("</tr>\n"); |
|
194 |
- } |
|
195 |
- output('</table>'); |
|
196 |
- if ($traffic_sum > 0) { |
|
197 |
- $traffic_string = $traffic_sum.' MB'; |
|
198 |
- if ($traffic_sum > 1024) { |
|
199 |
- $traffic_string = round($traffic_sum / 1024, 2).' GB'; |
|
200 |
- } |
|
201 |
- output('<p><strong>Traffic insgesamt: '.$traffic_string.'</strong> in den letzten 30 Tagen</p>'); |
|
202 |
- } |
|
203 |
- output('<p style="font-size: 90%;"><sup>*</sup>) Dieser Wert stellt den Datenverkehr dieser Website für die letzten 30 Tage dar.</p>'); |
|
204 |
- output('<p style="font-size: 90%;"><sup>**</sup>) schwach geschriebene Pfadangaben bezeichnen die Standardeinstellung. Ist ein Pfad fett dargestellt, so haben Sie einen davon abweichenden Wert eingegeben.</p>'); |
|
205 |
-} |
|
206 |
-elseif ($filter) { |
|
207 |
- output("<p><strong><em>Keine Einträge für Ihre aktuellen Filterkrieterien.</em></strong></p>"); |
|
208 |
-} |
|
209 |
-else // keine VHosts vorhanden |
|
210 |
-{ |
|
211 |
- output("<p><strong><em>Bisher haben Sie keine Domain bzw. Subdomain eingerichtet.</em></strong></p>"); |
|
174 |
+ output("<td>{$php}</td>"); |
|
175 |
+ if ($vhost['docroot_is_default'] == 1) { |
|
176 |
+ output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>"); |
|
177 |
+ } else { |
|
178 |
+ output("<td><strong>{$vhost['docroot']}</strong></td>"); |
|
179 |
+ } |
|
180 |
+ } |
|
181 |
+ output("</tr>\n"); |
|
182 |
+ } |
|
183 |
+ output('</table>'); |
|
184 |
+ if ($traffic_sum > 0) { |
|
185 |
+ $traffic_string = $traffic_sum.' MB'; |
|
186 |
+ if ($traffic_sum > 1024) { |
|
187 |
+ $traffic_string = round($traffic_sum / 1024, 2).' GB'; |
|
188 |
+ } |
|
189 |
+ output('<p><strong>Traffic insgesamt: '.$traffic_string.'</strong> in den letzten 30 Tagen</p>'); |
|
190 |
+ } |
|
191 |
+ output('<p style="font-size: 90%;"><sup>*</sup>) Dieser Wert stellt den Datenverkehr dieser Website für die letzten 30 Tage dar.</p>'); |
|
192 |
+ output('<p style="font-size: 90%;"><sup>**</sup>) schwach geschriebene Pfadangaben bezeichnen die Standardeinstellung. Ist ein Pfad fett dargestellt, so haben Sie einen davon abweichenden Wert eingegeben.</p>'); |
|
193 |
+} elseif ($filter) { |
|
194 |
+ output("<p><strong><em>Keine Einträge für Ihre aktuellen Filterkrieterien.</em></strong></p>"); |
|
195 |
+} else { // keine VHosts vorhanden |
|
196 |
+ output("<p><strong><em>Bisher haben Sie keine Domain bzw. Subdomain eingerichtet.</em></strong></p>"); |
|
212 | 197 |
} |
213 | 198 |
|
214 | 199 |
addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
215 | 200 |
|
216 | 201 |
output('<p>Bei passenden Einstellungen wird für jede Ihrer Websites automatisch ein Zertifikat von Let\'s Encrypt verwaltet und regelmäßig erneuert. Wenn Sie ein Zertifikat einsetzen möchten, das von einer anderen Zertifizierungsstelle ausgestellt ist, können Sie dieses hier hochladen.</p>'); |
217 | 202 |
addnew('newcert', 'Ein eigenes HTTPS-Zertifikat eintragen'); |
218 |
- |
|
219 |
-?> |
... | ... |
@@ -37,7 +37,7 @@ output("<p>Mit dieser Funktion legen Sie fest, welche Domains und Subdomains als |
37 | 37 |
|
38 | 38 |
$filter = ""; |
39 | 39 |
if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') { |
40 |
- $filter = $_REQUEST['filter']; |
|
40 |
+ $filter = filter_input_general($_REQUEST['filter']); |
|
41 | 41 |
} |
42 | 42 |
$vhosts = list_vhosts($filter); |
43 | 43 |
|
... | ... |
@@ -129,7 +129,7 @@ if (count($vhosts) > 0) |
129 | 129 |
} |
130 | 130 |
elseif ($vhost['cert']) |
131 | 131 |
{ |
132 |
- output("<td>".other_icon("secure.png", "HTTPS mit eigenem Zertifikat")."</td>"); |
|
132 |
+ output("<td>".other_icon("key.png", "HTTPS mit eigenem Zertifikat")."</td>"); |
|
133 | 133 |
} |
134 | 134 |
elseif (strstr($vhost['options'], "letsencrypt")) { |
135 | 135 |
// Letsencrypt gewählt aber noch nicht aktiv |
... | ... |
@@ -18,6 +18,9 @@ require_once('inc/debug.php'); |
18 | 18 |
require_once('inc/security.php'); |
19 | 19 |
require_once('inc/icons.php'); |
20 | 20 |
|
21 |
+require_once('inc/jquery.php'); |
|
22 |
+javascript(); |
|
23 |
+ |
|
21 | 24 |
require_once('vhosts.php'); |
22 | 25 |
|
23 | 26 |
title("Subdomains"); |
... | ... |
@@ -32,12 +35,16 @@ output("<p>Mit dieser Funktion legen Sie fest, welche Domains und Subdomains als |
32 | 35 |
"); |
33 | 36 |
|
34 | 37 |
|
35 |
-$domain = NULL; |
|
36 |
-if (isset($_REQUEST['domain']) && $_REQUEST['domain'] != '') { |
|
37 |
- $domain = $_REQUEST['domain']; |
|
38 |
- output('<p class="warning"><strong>Filter aktiv!</strong> Momentan werden nur Einstellungen für die Domain <strong>'.filter_input_general($domain).'</strong> angezeigt. Klicken Sie '.internal_link('', 'hier', 'domain=').' um alle Einstellungen anzuzeigen.</p>'); |
|
38 |
+$filter = ""; |
|
39 |
+if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') { |
|
40 |
+ $filter = $_REQUEST['filter']; |
|
41 |
+} |
|
42 |
+if (isset($_REQUEST['clear']) && $_REQUEST['clear'] == 'X') { |
|
43 |
+ $filter = ""; |
|
39 | 44 |
} |
40 |
-$vhosts = list_vhosts($domain); |
|
45 |
+$vhosts = list_vhosts($filter); |
|
46 |
+ |
|
47 |
+ |
|
41 | 48 |
$traffic_sum = 0; |
42 | 49 |
$letsencrypt = false; |
43 | 50 |
foreach ($vhosts as $vh) { |
... | ... |
@@ -45,6 +52,11 @@ foreach ($vhosts as $vh) { |
45 | 52 |
$letsencrypt = true; |
46 | 53 |
} |
47 | 54 |
} |
55 |
+// Filter-Funktion |
|
56 |
+if (count($vhosts) > 10 || $filter) { |
|
57 |
+ $form = '<p><label for="filter">Filter für die Anzeige:</label> <input type="text" name="filter" id="filter" value="'.$filter.'"><button type="button" id="clear" title="Filter leeren">×</button><input type="submit" value="Filtern!"></p>'; |
|
58 |
+ output(html_form('vhosts_filter', 'vhosts', '', $form)); |
|
59 |
+} |
|
48 | 60 |
|
49 | 61 |
if (count($vhosts) > 0) |
50 | 62 |
{ |
... | ... |
@@ -194,6 +206,9 @@ if (count($vhosts) > 0) |
194 | 206 |
output('<p style="font-size: 90%;"><sup>*</sup>) Dieser Wert stellt den Datenverkehr dieser Website für die letzten 30 Tage dar.</p>'); |
195 | 207 |
output('<p style="font-size: 90%;"><sup>**</sup>) schwach geschriebene Pfadangaben bezeichnen die Standardeinstellung. Ist ein Pfad fett dargestellt, so haben Sie einen davon abweichenden Wert eingegeben.</p>'); |
196 | 208 |
} |
209 |
+elseif ($filter) { |
|
210 |
+ output("<p><strong><em>Keine Einträge für Ihre aktuellen Filterkrieterien.</em></strong></p>"); |
|
211 |
+} |
|
197 | 212 |
else // keine VHosts vorhanden |
198 | 213 |
{ |
199 | 214 |
output("<p><strong><em>Bisher haben Sie keine Domain bzw. Subdomain eingerichtet.</em></strong></p>"); |
... | ... |
@@ -156,20 +156,24 @@ if (count($vhosts) > 0) |
156 | 156 |
$php = $vhost['php']; |
157 | 157 |
switch ($php) |
158 | 158 |
{ |
159 |
+ /* To create new PHP icon: |
|
160 |
+ convert ok.png -gravity center -draw "text 0,0 '7.2'" ok-php72.png |
|
161 |
+ */ |
|
159 | 162 |
case NULL: |
160 | 163 |
$php = icon_disabled('PHP ausgeschaltet'); |
161 | 164 |
break; |
162 | 165 |
case 'php56': |
163 | 166 |
$php = icon_enabled_phpxx('PHP in Version 5.6 eingeschaltet', 5, 6); |
164 | 167 |
break; |
165 |
- case 'php70': |
|
166 | 168 |
case 'fpm70': |
167 | 169 |
$php = icon_enabled_phpxx('PHP in Version 7.0 eingeschaltet', 7, 0); |
168 | 170 |
break; |
169 |
- case 'php71': |
|
170 | 171 |
case 'fpm71': |
171 | 172 |
$php = icon_enabled_phpxx('PHP in Version 7.1 eingeschaltet', 7, 1); |
172 | 173 |
break; |
174 |
+ case 'fpm72': |
|
175 |
+ $php = icon_enabled_phpxx('PHP in Version 7.2 eingeschaltet', 7, 2); |
|
176 |
+ break; |
|
173 | 177 |
} |
174 | 178 |
output("<td>{$php}</td>"); |
175 | 179 |
if ($vhost['docroot_is_default'] == 1) |
... | ... |
@@ -57,7 +57,7 @@ if (count($vhosts) > 0) |
57 | 57 |
if (count($vhosts) > 10) { |
58 | 58 |
addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
59 | 59 |
} |
60 |
- output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>SSL</th><th>Traffic<sup>*</sup></th><th>PHP</th><th>Lokaler Pfad<sup>**</sup></th></tr>\n"); |
|
60 |
+ output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>HTTPS</th><th>Traffic<sup>*</sup></th><th>PHP</th><th>Lokaler Pfad<sup>**</sup></th></tr>\n"); |
|
61 | 61 |
|
62 | 62 |
$even = True; |
63 | 63 |
|
... | ... |
@@ -106,13 +106,13 @@ if (count($vhosts) > 0) |
106 | 106 |
|
107 | 107 |
if ($vhost['ssl'] == 'http') |
108 | 108 |
{ |
109 |
- output("<td>".icon_disabled('SSL ausgeschaltet')."</td>"); |
|
109 |
+ output("<td>".icon_disabled('HTTPS ausgeschaltet')."</td>"); |
|
110 | 110 |
} |
111 | 111 |
elseif (strstr($vhost['options'], "letsencrypt") && $vhost['cert']) |
112 | 112 |
{ |
113 | 113 |
$forward = ''; |
114 | 114 |
if ($vhost['ssl'] == 'forward') { |
115 |
- $forward = " ".other_icon("refresh.png", 'Auf SSL umleiten'); |
|
115 |
+ $forward = " ".other_icon("refresh.png", 'Auf HTTPS umleiten'); |
|
116 | 116 |
} else { |
117 | 117 |
$forward = " ".other_icon("warning.png", 'Ungeschützter Aufruf weiterhin möglich'); |
118 | 118 |
} |
... | ... |
@@ -120,7 +120,7 @@ if (count($vhosts) > 0) |
120 | 120 |
} |
121 | 121 |
elseif ($vhost['cert']) |
122 | 122 |
{ |
123 |
- output("<td>".other_icon("secure.png", "SSL mit eigenem Zertifikat")."</td>"); |
|
123 |
+ output("<td>".other_icon("secure.png", "HTTPS mit eigenem Zertifikat")."</td>"); |
|
124 | 124 |
} |
125 | 125 |
elseif (strstr($vhost['options'], "letsencrypt")) { |
126 | 126 |
// Letsencrypt gewählt aber noch nicht aktiv |
... | ... |
@@ -129,7 +129,7 @@ if (count($vhosts) > 0) |
129 | 129 |
} |
130 | 130 |
else |
131 | 131 |
{ |
132 |
- output("<td>".icon_enabled('SSL eingeschaltet')."</td>"); |
|
132 |
+ output("<td>".icon_enabled('HTTPS eingeschaltet')."</td>"); |
|
133 | 133 |
} |
134 | 134 |
|
135 | 135 |
$traffic = traffic_month($vhost['id']); |
... | ... |
@@ -197,4 +197,7 @@ else // keine VHosts vorhanden |
197 | 197 |
|
198 | 198 |
addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
199 | 199 |
|
200 |
+output('<p>Bei passenden Einstellungen wird für jede Ihrer Websites automatisch ein Zertifikat von Let\'s Encrypt verwaltet und regelmäßig erneuert. Wenn Sie ein Zertifikat einsetzen möchten, das von einer anderen Zertifizierungsstelle ausgestellt ist, können Sie dieses hier hochladen.</p>'); |
|
201 |
+addnew('newcert', 'Ein eigenes HTTPS-Zertifikat eintragen'); |
|
202 |
+ |
|
200 | 203 |
?> |
... | ... |
@@ -159,18 +159,17 @@ if (count($vhosts) > 0) |
159 | 159 |
case NULL: |
160 | 160 |
$php = icon_disabled('PHP ausgeschaltet'); |
161 | 161 |
break; |
162 |
- case 'php54': |
|
163 |
- $php = icon_enabled_warning('PHP in veralteter Version aktiviert'); |
|
164 |
- break; |
|
165 |
- case 'php55': |
|
166 |
- $php = icon_enabled_phpxx('PHP in Version 5.5 eingeschaltet', 5, 5); |
|
167 |
- break; |
|
168 | 162 |
case 'php56': |
169 | 163 |
$php = icon_enabled_phpxx('PHP in Version 5.6 eingeschaltet', 5, 6); |
170 | 164 |
break; |
171 |
- case 'fpm70': # FIXME: FPM soll bald default sein |
|
165 |
+ case 'php70': |
|
166 |
+ case 'fpm70': |
|
172 | 167 |
$php = icon_enabled_phpxx('PHP in Version 7.0 eingeschaltet', 7, 0); |
173 | 168 |
break; |
169 |
+ case 'php71': |
|
170 |
+ case 'fpm71': |
|
171 |
+ $php = icon_enabled_phpxx('PHP in Version 7.1 eingeschaltet', 7, 1); |
|
172 |
+ break; |
|
174 | 173 |
} |
175 | 174 |
output("<td>{$php}</td>"); |
176 | 175 |
if ($vhost['docroot_is_default'] == 1) |
... | ... |
@@ -48,10 +48,12 @@ foreach ($vhosts as $vh) { |
48 | 48 |
|
49 | 49 |
if (count($vhosts) > 0) |
50 | 50 |
{ |
51 |
+ /* |
|
51 | 52 |
if ($letsencrypt) { |
52 | 53 |
warning("Sie haben für eine oder mehrere Domains die Nutzung eines Let's-Encrypt-Zertifikats aktiviert. Wir haben diese Funktion nach allgemeiner Verfügbarkeit von Let's Encrypt umgehend freigeschaltet und sind mit der ersten Erfahrungen sehr zufrieden. Dennoch befindet sich Let's Encrypt momentan im Beta-Betrieb (d.h. Testbetrieb). Störungen sind daher nicht auszuschließen."); |
53 | 54 |
warning("Die Bereitstellung eines Zertifikats von Let's Encrypt kann momentan bis zu 15 Minuten in Anspruch nehmen."); |
54 | 55 |
} |
56 |
+ */ |
|
55 | 57 |
if (count($vhosts) > 10) { |
56 | 58 |
addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
57 | 59 |
} |
... | ... |
@@ -108,7 +108,13 @@ if (count($vhosts) > 0) |
108 | 108 |
} |
109 | 109 |
elseif (strstr($vhost['options'], "letsencrypt") && $vhost['cert']) |
110 | 110 |
{ |
111 |
- output("<td>".other_icon("letsencrypt.png", "Automatische Zertifikatsverwaltung mit Let's Encrypt")."</td>"); |
|
111 |
+ $forward = ''; |
|
112 |
+ if ($vhost['ssl'] == 'forward') { |
|
113 |
+ $forward = " ".other_icon("refresh.png", 'Auf SSL umleiten'); |
|
114 |
+ } else { |
|
115 |
+ $forward = " ".other_icon("warning.png", 'Ungeschützter Aufruf weiterhin möglich'); |
|
116 |
+ } |
|
117 |
+ output("<td>".other_icon("letsencrypt.png", "Automatische Zertifikatsverwaltung mit Let's Encrypt").$forward."</td>"); |
|
112 | 118 |
} |
113 | 119 |
elseif ($vhost['cert']) |
114 | 120 |
{ |
... | ... |
@@ -106,6 +106,10 @@ if (count($vhosts) > 0) |
106 | 106 |
{ |
107 | 107 |
output("<td>".icon_disabled('SSL ausgeschaltet')."</td>"); |
108 | 108 |
} |
109 |
+ elseif (strstr($vhost['options'], "letsencrypt") && $vhost['cert']) |
|
110 |
+ { |
|
111 |
+ output("<td>".other_icon("letsencrypt.png", "Automatische Zertifikatsverwaltung mit Let's Encrypt")."</td>"); |
|
112 |
+ } |
|
109 | 113 |
elseif ($vhost['cert']) |
110 | 114 |
{ |
111 | 115 |
output("<td>".other_icon("secure.png", "SSL mit eigenem Zertifikat")."</td>"); |
... | ... |
@@ -113,7 +117,7 @@ if (count($vhosts) > 0) |
113 | 117 |
elseif (strstr($vhost['options'], "letsencrypt")) { |
114 | 118 |
// Letsencrypt gewählt aber noch nicht aktiv |
115 | 119 |
$message = "Let's Encrypt-Zertifikat ist noch nicht bereit"; |
116 |
- output("<td>".other_icon("secure.png", $message).icon_warning($message)."</td>"); |
|
120 |
+ output("<td>".other_icon("letsencrypt.png", $message).icon_warning($message)."</td>"); |
|
117 | 121 |
} |
118 | 122 |
else |
119 | 123 |
{ |
... | ... |
@@ -156,7 +156,7 @@ if (count($vhosts) > 0) |
156 | 156 |
case 'php56': |
157 | 157 |
$php = icon_enabled_phpxx('PHP in Version 5.6 eingeschaltet', 5, 6); |
158 | 158 |
break; |
159 |
- case 'php70': |
|
159 |
+ case 'fpm70': # FIXME: FPM soll bald default sein |
|
160 | 160 |
$php = icon_enabled_phpxx('PHP in Version 7.0 eingeschaltet', 7, 0); |
161 | 161 |
break; |
162 | 162 |
} |
... | ... |
@@ -39,9 +39,19 @@ if (isset($_REQUEST['domain']) && $_REQUEST['domain'] != '') { |
39 | 39 |
} |
40 | 40 |
$vhosts = list_vhosts($domain); |
41 | 41 |
$traffic_sum = 0; |
42 |
+$letsencrypt = false; |
|
43 |
+foreach ($vhosts as $vh) { |
|
44 |
+ if (strstr($vh['options'], 'letsencrypt')) { |
|
45 |
+ $letsencrypt = true; |
|
46 |
+ } |
|
47 |
+} |
|
42 | 48 |
|
43 | 49 |
if (count($vhosts) > 0) |
44 | 50 |
{ |
51 |
+ if ($letsencrypt) { |
|
52 |
+ warning("Sie haben für eine oder mehrere Domains die Nutzung eines Let's-Encrypt-Zertifikats aktiviert. Wir haben diese Funktion nach allgemeiner Verfügbarkeit von Let's Encrypt umgehend freigeschaltet und sind mit der ersten Erfahrungen sehr zufrieden. Dennoch befindet sich Let's Encrypt momentan im Beta-Betrieb (d.h. Testbetrieb). Störungen sind daher nicht auszuschließen."); |
|
53 |
+ warning("Die Bereitstellung eines Zertifikats von Let's Encrypt kann momentan bis zu 15 Minuten in Anspruch nehmen."); |
|
54 |
+ } |
|
45 | 55 |
if (count($vhosts) > 10) { |
46 | 56 |
addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
47 | 57 |
} |
... | ... |
@@ -98,7 +98,12 @@ if (count($vhosts) > 0) |
98 | 98 |
} |
99 | 99 |
elseif ($vhost['cert']) |
100 | 100 |
{ |
101 |
- output("<td><img src=\"{$prefix}images/secure.png\" style=\"height: 16px; width: 16px;\" alt=\"cert\" title=\"SSL mit eigenem Zertifikat\" /></td>"); |
|
101 |
+ output("<td>".other_icon("secure.png", "SSL mit eigenem Zertifikat")."</td>"); |
|
102 |
+ } |
|
103 |
+ elseif (strstr($vhost['options'], "letsencrypt")) { |
|
104 |
+ // Letsencrypt gewählt aber noch nicht aktiv |
|
105 |
+ $message = "Let's Encrypt-Zertifikat ist noch nicht bereit"; |
|
106 |
+ output("<td>".other_icon("secure.png", $message).icon_warning($message)."</td>"); |
|
102 | 107 |
} |
103 | 108 |
else |
104 | 109 |
{ |
... | ... |
@@ -141,6 +141,9 @@ if (count($vhosts) > 0) |
141 | 141 |
case 'php56': |
142 | 142 |
$php = icon_enabled_phpxx('PHP in Version 5.6 eingeschaltet', 5, 6); |
143 | 143 |
break; |
144 |
+ case 'php70': |
|
145 |
+ $php = icon_enabled_phpxx('PHP in Version 7.0 eingeschaltet', 7, 0); |
|
146 |
+ break; |
|
144 | 147 |
} |
145 | 148 |
output("<td>{$php}</td>"); |
146 | 149 |
if ($vhost['docroot_is_default'] == 1) |
... | ... |
@@ -132,9 +132,6 @@ if (count($vhosts) > 0) |
132 | 132 |
case NULL: |
133 | 133 |
$php = icon_disabled('PHP ausgeschaltet'); |
134 | 134 |
break; |
135 |
- case 'php53': |
|
136 |
- $php = icon_enabled_warning('PHP in veralteter Version aktiviert'); |
|
137 |
- break; |
|
138 | 135 |
case 'php54': |
139 | 136 |
$php = icon_enabled_warning('PHP in veralteter Version aktiviert'); |
140 | 137 |
break; |
... | ... |
@@ -44,7 +44,6 @@ if (count($vhosts) > 0) |
44 | 44 |
{ |
45 | 45 |
if (count($vhosts) > 10) { |
46 | 46 |
addnew('edit', 'Neue Domain bzw. Subdomain einrichten'); |
47 |
- addnew('../webapps/install', 'Neue Domain bzw. Subdomain mit vorinstallierter Web-Anwendung einrichten'); |
|
48 | 47 |
} |
49 | 48 |
output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Protokoll</th><th>SSL</th><th>Traffic<sup>*</sup></th><th>PHP</th><th>Lokaler Pfad<sup>**</sup></th></tr>\n"); |
50 | 49 |
|
... | ... |
@@ -133,20 +133,17 @@ if (count($vhosts) > 0) |
133 | 133 |
case NULL: |
134 | 134 |
$php = icon_disabled('PHP ausgeschaltet'); |
135 | 135 |
break; |
136 |
- case 'mod_php': |
|
137 |
- $php = icon_warning('[mod_php] Veraltet, bitte umstellen!').' Apache-Modul'; |
|
138 |
- break; |
|
139 |
- case 'fastcgi': |
|
140 |
- $php = icon_enabled_warning('PHP in veralteter Version aktiviert'); |
|
141 |
- break; |
|
142 | 136 |
case 'php53': |
143 |
- $php = icon_enabled_php53('PHP in Version 5.3 eingeschaltet'); |
|
137 |
+ $php = icon_enabled_warning('PHP in veralteter Version aktiviert'); |
|
144 | 138 |
break; |
145 | 139 |
case 'php54': |
146 |
- $php = icon_enabled_php54('PHP in Version 5.4 eingeschaltet'); |
|
140 |
+ $php = icon_enabled_warning('PHP in veralteter Version aktiviert'); |
|
147 | 141 |
break; |
148 | 142 |
case 'php55': |
149 |
- $php = icon_enabled_php55('PHP in Version 5.5 eingeschaltet'); |
|
143 |
+ $php = icon_enabled_phpxx('PHP in Version 5.5 eingeschaltet', 5, 5); |
|
144 |
+ break; |
|
145 |
+ case 'php56': |
|
146 |
+ $php = icon_enabled_phpxx('PHP in Version 5.6 eingeschaltet', 5, 6); |
|
150 | 147 |
break; |
151 | 148 |
} |
152 | 149 |
output("<td>{$php}</td>"); |
... | ... |
@@ -32,7 +32,12 @@ output("<p>Mit dieser Funktion legen Sie fest, welche Domains und Subdomains als |
32 | 32 |
"); |
33 | 33 |
|
34 | 34 |
|
35 |
-$vhosts = list_vhosts(); |
|
35 |
+$domain = NULL; |
|
36 |
+if (isset($_REQUEST['domain']) && $_REQUEST['domain'] != '') { |
|
37 |
+ $domain = $_REQUEST['domain']; |
|
38 |
+ output('<p class="warning"><strong>Filter aktiv!</strong> Momentan werden nur Einstellungen für die Domain <strong>'.filter_input_general($domain).'</strong> angezeigt. Klicken Sie '.internal_link('', 'hier', 'domain=').' um alle Einstellungen anzuzeigen.</p>'); |
|
39 |
+} |
|
40 |
+$vhosts = list_vhosts($domain); |
|
36 | 41 |
$traffic_sum = 0; |
37 | 42 |
|
38 | 43 |
if (count($vhosts) > 0) |
... | ... |
@@ -51,7 +56,15 @@ if (count($vhosts) > 0) |
51 | 56 |
$fqdn = $vhost['fqdn']; |
52 | 57 |
$class = 'odd'; |
53 | 58 |
if ($even) $class = 'even'; |
54 |
- output("<tr class=\"{$class}\"><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}", 'title="Einstellungen bearbeiten"')."</td><td>".internal_link('save', icon_delete("»{$vhost['fqdn']}« löschen"), 'action=delete&vhost='.$vhost['id'] )."</td><td>"); |
|
59 |
+ $proto = 'http'; |
|
60 |
+ if ($vhost['ssl'] == 'https' || $vhost['ssl'] == 'forward') { |
|
61 |
+ $proto = 'https'; |
|
62 |
+ } |
|
63 |
+ $linkuri = $vhost['fqdn']; |
|
64 |
+ if (strstr($vhost['options'], 'aliaswww')) { |
|
65 |
+ $linkuri = "www.".$vhost['fqdn']; |
|
66 |
+ } |
|
67 |
+ output("<tr class=\"{$class}\"><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}", 'title="Einstellungen bearbeiten"')."</td><td><a href=\"{$proto}://{$linkuri}\">".other_icon('world_link.png', 'Website aufrufen')."</a> ".internal_link('save', icon_delete("»{$vhost['fqdn']}« löschen"), 'action=delete&vhost='.$vhost['id'] )."</td><td>"); |
|
55 | 68 |
$aliases = get_all_aliases($vhost); |
56 | 69 |
$tmp = ''; |
57 | 70 |
if (count($aliases) > 0) |