This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
31
CentOS-WebPanel GUI / Re: [Feature Request] Use A Full Apache Status
« on: June 25, 2023, 05:09:48 PM »
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
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>
1. Create /usr/local/cwpsrv/htdocs/resources/admin/modules/apache_status.php with the following contents
Code: [Select]
<?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>
32
I can build it / Re: Apache Status - Accesses
« on: June 24, 2023, 07:36:41 PM »
This would be better and show more info:
Code: [Select]
<?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;
?>