72518278 |
<?php
require_once('inc/debug.php');
require_once('inc/security.php');
require_once('vhosts.php');
|
709c9ea2 |
$title = "Subdomains";
|
72518278 |
$error = '';
require_role(ROLE_SYSTEMUSER);
|
3cda75a7 |
global $prefix;
|
72518278 |
|
709c9ea2 |
output("<h3>Subdomains</h3>
|
046705ef |
<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>
|
b3c8f947 |
<p>Änderungen an Ihren Einstellungen werden im 5-Minuten-Takt auf dem Server übernommen.</p>
");
|
72518278 |
|
d70a5791 |
|
72518278 |
$vhosts = list_vhosts();
if (count($vhosts) > 0)
{
|
832d06da |
output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Logfiles</th><th>PHP</th><th>Lokaler Pfad<sup>*</sup></th></tr>");
|
709c9ea2 |
|
72518278 |
foreach ($vhosts as $vhost)
{
$fqdn = $vhost['fqdn'];
|
63a0529b |
output("<tr><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}")."</td><td>".internal_link('save', "<img src=\"{$prefix}images/delete.png\" title=\"»{$vhost['fqdn']}« löschen\" alt=\"löschen\" />", 'action=delete&vhost='.$vhost['id'] )."</td><td>");
|
709c9ea2 |
$aliases = get_all_aliases($vhost['id']);
|
72518278 |
foreach ($aliases as $alias)
{
output($alias['fqdn'].'<br />');
}
|
63a0529b |
output(internal_link('aliases', 'Aliase verwalten', 'vhost='.$vhost['id']));
|
72518278 |
output('</td>');
|
47b732dc |
$logfiles = 'keine';
if ($vhost['logtype'] == 'default')
$logfiles = 'normal';
elseif ($vhost['logtype'] == 'anonymous')
$logfiles = 'anonym';
if ($vhost['errorlog'] == 1)
{
if ($logfiles == 'keine')
$logfiles = 'nur Fehler';
else
$logfiles .= ', Fehler';
}
output("<td>{$logfiles}</td>");
|
832d06da |
if ($vhost['is_webapp'] == 1) {
output('<td colspan="2"><em>globale Webanwendung</em></td>');
}
elseif ($vhost['is_dav'] == 1) {
output('<td colspan="2"><em>WebDAV</em></td>');
}
elseif ($vhost['is_svn'] == 1) {
output('<td colspan="2"><em>Subversion-Server</em></td>');
}
else {
$php = $vhost['php'];
switch ($php)
{
case NULL:
|
06173076 |
$php = 'kein PHP';
|
832d06da |
break;
case 'mod_php':
$php = 'Apache-Modul';
break;
case 'fastcgi':
$php = 'FastCGI';
break;
}
output("<td>{$php}</td>");
if ($vhost['docroot_is_default'] == 1)
output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>");
else
output("<td><strong>{$vhost['docroot']}</strong></td>");
}
|
47b732dc |
output("</tr>");
|
72518278 |
}
|
ec226905 |
output('</table>');
|
ec0c81a8 |
output('<p><sup>*</sup>) schwach geschriebene Pfadangaben bezeichnen die Standardeinstellung. Ist ein Pfad fett dargestellt, so haben Sie einen davon abweichenden Wert eingegeben.</p>');
|
ec226905 |
output(' <br />');
|
72518278 |
}
|
63a0529b |
output('<p>'.internal_link('edit', 'Neue Domain bzw. Subdomain einrichten').'</p>');
|
ec226905 |
output(' <br />');
|
72518278 |
?>
|