Jump to content

Hide PHPInfo from Server Status.


Recommended Posts

Yep, it's dead easy...all you need to do is edit the serverstatus.tpl file

 

Infact, here is a copy of our status script which we use for cPanel servers. No PHPinfo at all.

 

<p>{$LANG.serverstatusheadingtext}</p>

<table id="serverstatus" align="center" cellspacing="1">
<tr>
<td width="15%" id="serverstatusheading">{$LANG.servername}</td>
<td width="11%" id="serverstatusheading">HTTP</td>
<td width="11%" id="serverstatusheading">FTP</td>
<td width="11%" id="serverstatusheading">POP3</td>
<td width="11%" id="serverstatusheading">SMTP</td>
<td width="11%" id="serverstatusheading">MYSQL</td>
<td width="11%" id="serverstatusheading">CPANEL</td>
</tr>
{foreach key=num item=server from=$servers}
<tr>
<td width="15%" id="serverstatusrow">{$server.name}</td>
<td width="11%" id="serverstatusrow">{get_port_status num="$num" port="80"}</td>
<td width="11%" id="serverstatusrow">{get_port_status num="$num" port="21"}</td>
<td width="11%" id="serverstatusrow">{get_port_status num="$num" port="110"}</td>
<td width="11%" id="serverstatusrow">{get_port_status num="$num" port="25"}</td>
<td width="11%" id="serverstatusrow">{get_port_status num="$num" port="3306"}</td>
<td width="11%" id="serverstatusrow">{get_port_status num="$num" port="2082"}</td>
</tr>
{foreachelse}
<tr>
<td id="serverstatusrow" colspan="7">{$LANG.serverstatusnoservers}</td>
</tr>
{/foreach}
</table>

 

The code can be altered to carry out whatever command or status check on any port you like. Simply change the port number your checking against and the name (and be sure your script has access through the firewall to that port) and your away :)

 

Regards,

 

Dale Evans

Manager

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated