51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<html>
|
|
<head>
|
|
<title>API Server | <?= gethostname() ?></title>
|
|
<style>
|
|
.box {
|
|
width: 300px;
|
|
margin: 0 auto;
|
|
background: #f7f7f7;
|
|
border: 1px solid #ededed;
|
|
padding: 10px;
|
|
font-size: 2em;
|
|
margin-top: 25px;
|
|
text-align: center;
|
|
color: #636363;
|
|
font-family: monospace;
|
|
}
|
|
.footer {
|
|
margin: 0 auto;
|
|
font-size: 1em;
|
|
margin-top: 25px;
|
|
text-align: left;
|
|
color: #636363;
|
|
font-family: monospace;
|
|
width: 400px;
|
|
color: gray;
|
|
}
|
|
.bold {
|
|
font-weight: bold;
|
|
color: black;
|
|
}
|
|
.uname {
|
|
margin: 0 auto;
|
|
margin-top: 25px;
|
|
text-align: center;
|
|
color: #636363;
|
|
font-family: monospace;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="box">External API server</div>
|
|
<div class="footer">
|
|
<span class="bold">Hostname:</span> <?= shell_exec('hostname') ?><br>
|
|
<span class="bold">Internal IP:</span> <?= shell_exec('ifconfig ens18 | grep \'inet \'| grep -v \'127.0.0.1\' | cut -d: -f2 | awk \'{ print $2}\'') ?><br>
|
|
<span class="bold">Document root:</span> <?php echo $_SERVER['DOCUMENT_ROOT']; ?><br>
|
|
<span class="bold">Disk usage:</span> <?= shell_exec('df -h | grep sda') ?><br>
|
|
</div>
|
|
<div class="uname"><?= shell_exec('uname -a') ?></div>
|
|
</body>
|
|
</html>
|