In case the server is configured to use the webserver config like: Nginx+Apache, Nginx+Varnish+Apache then the script must be changed to:
<?php
// Apache Status - Accesses v0.4
$url = "http://localhost:8181/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;
?>
Additionally, to see the reals IPs of the visitors the module mod_rpaf should be replaced with the module mod_remoteip in the main apache config and configured accordingly. In other case the main IP address of the server will be shown as the visitor's IP.