Using PHP to output HTML instead now

This commit is contained in:
WilliamMiceli
2019-10-19 18:39:18 -04:00
parent 8c4e41df1a
commit 19c787f0c5
3 changed files with 17 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ server {
error_log /var/log/nginx/error.log;
location / {
try_files $uri $uri/ /index.html =404;
try_files $uri $uri/ /index.php /index.html =404;
}
location ~ \.php$ {

View File

@@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Test Page</title>
</head>
<body>
<h1>Test Page</h1>
</body>
</html>

16
var/www/index.php Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Today&rsquo;s Date</title>
<meta http-equiv="content-type"
content="text/html; charset=utf-8"/>
</head>
<body>
<p>Today&rsquo;s date (according to this web server) is
<?php
echo date('l, F dS Y.');
?>
</p>
</body>
</html>