Changes

Jump to: navigation, search

OPS345 Lab 3

856 bytes added, 01:40, 22 September 2021
no edit summary
* ss -atnp on router and www
* install php, restart httpd
* make proper html page:<source>
<html>
<head>
<style>
body {background-color: powderblue;}
table {border-spacing: 1cm 0cm;}
h2 {color: blue;}
th {text-align: left;}
p {color: red; font-weight: bold;}
</style>
</head>
<body>
Hello. My web server still works.<br />
If this shows the current date and time, PHP works too:<br /><br />
<?php system("date"); ?>
<h2>Instance Info</h2>
<table>
<tr><th>Configuration</th><th>Value</th></tr>
<tr>
<td><p>Private IP</p></td>
<td><?php system("curl http://169.254.169.254/latest/meta-data/local-ipv4"); ?></td>
</tr>
<tr>
<td><p>Public IP</p></td>
<td><?php system("curl http://169.254.169.254/latest/meta-data/public-ipv4"); ?></td>
</tr>
</table>
<h2>Very simple web app using <a href="http://phpqrcode.sourceforge.net/">PHP QR Code</a></h2>
<img src="<?php
?>" />
</body>
</html>
</source>

Navigation menu