diff options
author | mcrane <mctch@yahoo.com> | 2009-12-21 20:14:49 -0700 |
---|---|---|
committer | mcrane <mctch@yahoo.com> | 2009-12-21 20:16:48 -0700 |
commit | 98b50f46c2d617766024c5b0941cdf12c8c8937d (patch) | |
tree | 0e0808034de4065ec4992720f6634ba865e7f8b2 /config/vhosts/vhosts_php.tmp | |
parent | 26b4db6c47d6b26c291f6ccd56e0cd0fa61377e3 (diff) | |
download | pfsense-packages-98b50f46c2d617766024c5b0941cdf12c8c8937d.tar.gz pfsense-packages-98b50f46c2d617766024c5b0941cdf12c8c8937d.tar.bz2 pfsense-packages-98b50f46c2d617766024c5b0941cdf12c8c8937d.zip |
vHosts web server package add SSL support.
Diffstat (limited to 'config/vhosts/vhosts_php.tmp')
-rw-r--r-- | config/vhosts/vhosts_php.tmp | 85 |
1 files changed, 66 insertions, 19 deletions
diff --git a/config/vhosts/vhosts_php.tmp b/config/vhosts/vhosts_php.tmp index 41ccf11f..43823dd1 100644 --- a/config/vhosts/vhosts_php.tmp +++ b/config/vhosts/vhosts_php.tmp @@ -31,12 +31,42 @@ require("guiconfig.inc"); require("/usr/local/pkg/vhosts.inc"); $a_vhosts = &$config['installedpackages']['vhosts']['config']; - +$a_service = $config['installedpackages']['service']; if ($_GET['act'] == "del") { if ($_GET['type'] == 'php') { if ($a_vhosts[$_GET['id']]) { - unset($a_vhosts[$_GET['id']]); + //get vhost info + $x = 0; + foreach($a_vhosts as $rowhelper) { + if ($_GET['id'] == $x) { + print_r ($rowhelper); exit; + $id = $x; //return the id + $host = $rowhelper['host']; + $ipaddress = $rowhelper['ipaddress']; + $port = $rowhelper['port']; + $directory = $rowhelper['directory']; + if (strlen($certificate) > 0) { + $ssl = true; + } + else { + $ssl = false; + } + } + $x++; + } + //delete vhosts entry + unset($a_vhosts[$_GET['id']]); + + //delete the SSL service + if ($ssl) { + unlink_if_exists("/var/etc/lighty-vhosts-".$ipaddress."-".$port."-ssl.conf"); + unlink_if_exists("/usr/local/etc/rc.d/vhosts-".$ipaddress."-".$port."-ssl.sh"); + $service_id = get_service_id ($a_service, 'rcfile', "vhosts-".$ipaddress."-".$port."-ssl.sh"); + if (is_int($service_id)) { + unset($a_service[$service_id]); + } + } write_config(); header("Location: vhosts_php.php"); exit; @@ -51,7 +81,7 @@ include("head.inc"); <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<p class="pgtitle">vHosts:</p> +<p class="pgtitle">vHosts: Web Server</p> <div id="mainlevel"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> @@ -88,7 +118,9 @@ include("head.inc"); <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> <td><p><!--<span class="vexpl"><span class="red"><strong>PHP Service<br></strong></span>--> - vHosts is a web server package that can host HTML, Javascript, CSS, and PHP. It uses the lighttpd web server that is already installed. It uses PHP5 in FastCGI mode and has access to PHP Data Ojbects and PDO SQLite. + vHosts is a web server package that can host HTML, Javascript, CSS, and PHP. It uses the lighttpd web server + that is already installed. It uses PHP5 in FastCGI mode and has access to PHP Data Ojbects and PDO SQLite. + After adding or updating and entry make sure to restart the <a href='/status_services.php'>service</a> to apply the settings. <br /><br /> For more information see: <a href='http://doc.pfsense.org/index.php/vhosts'>http://doc.pfsense.org/index.php/vhosts</a> </p></td> @@ -98,19 +130,19 @@ include("head.inc"); <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> - <td width="30%" class="listhdrr">Host</td> - <td width="20%" class="listhdrr">Enabled</td> - <td width="40%" class="listhdr">Description</td> - <td width="10%" class="list"> - - <table border="0" cellspacing="0" cellpadding="1"> - <tr> - <td width="17"></td> - <td valign="middle"><a href="vhosts_php_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td> - </tr> - </table> - - </td> + <td width="30%" class="listhdrr">Host</td> + <td width="20" class="listhdrr">Port</td> + <td width="20" class="listhdrr">SSL</td> + <td width="20" class="listhdrr">Enabled</td> + <td width="40%" class="listhdr">Description</td> + <td width="10%" class="list"> + <table border="0" cellspacing="0" cellpadding="1"> + <tr> + <td width="17"></td> + <td valign="middle"><a href="vhosts_php_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td> + </tr> + </table> + </td> </tr> <?php @@ -140,7 +172,22 @@ include("head.inc"); <a href='<?=$vhost_url;?>' target='_blank'><?=$ent['host'];?></a> </td> <td class="listr" ondblclick="document.location='vhosts_php_edit.php?id=<?=$i;?>';"> - <?=$ent['enabled'];?> + <a href='<?=$vhost_url;?>' target='_blank'><?=$ent['port'];?></a> + </td> + <td class="listr" ondblclick="document.location='vhosts_php_edit.php?id=<?=$i;?>';"> + <div align='center'> + <?php + if ($http_protocol == "https") { + echo "x"; + } + else { + echo " "; + } + ?> + </div> + </td> + <td class="listr" ondblclick="document.location='vhosts_php_edit.php?id=<?=$i;?>'; align='center' "> + <?php echo $ent['enabled']; ?> </td> <td class="listbg" ondblclick="document.location='vhosts_php_edit.php?id=<?=$i;?>';"> <font color="#FFFFFF"><?=htmlspecialchars($ent['description']);?> @@ -161,7 +208,7 @@ include("head.inc"); ?> <tr> - <td class="list" colspan="3"></td> + <td class="list" colspan="5"></td> <td class="list"> <table border="0" cellspacing="0" cellpadding="1"> <tr> |