Control Web Panel
WebPanel => CentOS-WebPanel GUI => Topic started by: ejsolutions on July 05, 2019, 02:12:15 PM
-
The httpd_fullstatus page isn't actually correct.
Please consider using a formatted (wider) version of
/usr/local/apache/bin/apachectl fullstatus
-
Following my feature request, I have now integrated it in CWP, so for the benefit of others..
1. Create /usr/local/cwpsrv/htdocs/resources/admin/modules/apache_status.php with the following contents
<?php
// Apache Status - Accesses v0.4
$url = "http://localhost/server-status";
$ch_session = curl_init();
curl_setopt($ch_session, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch_session, CURLOPT_URL, $url);
$result_url = curl_exec($ch_session);
echo $result_url;
?>
To Add under webservers instead of Developer Options
/usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php
<script type="text/javascript">
$(document).ready(function() {
var newButtons = ''
+' <li>'
+' <a href="?module=apache_status"><span aria-hidden="true" class="icon16 icomoon-icon-switch"></span>Apache Status - Accesses</span></a>'
+'</li>';
$("ul#mn-15-sub").prepend(newButtons);
});
</script>
-
I implemented this on my CWP apache server after the other thread brought it out; the only change I made was to make the icon an arrow so it matched the others -- a "power button" icon didn't make sense to me:
<?php include('/usr/local/cwpsrv/htdocs/resources/admin/include/configserver.php'); ?>
<script type="text/javascript">
$(document).ready(function() {
var newButtons = ''
+' <li>'
+' <a href="?module=apache_status"><span aria-hidden="true" class="icon16 icomoon-icon-arrow-right-3"></span>Apache Accesses</span></a>'
+'</li>';
$("ul#mn-3-sub").prepend(newButtons);
});
</script>