I tried 3 things :
- a simple html file : ok
- a simple php file : ok
- a html file with some php code inside : not ok
My configuration is
- Ubuntu :
ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
- NGINX :
ubuntu@ubuntu:~$ nginx -v
nginx version: nginx/1.18.0 (Ubuntu)
- PHP :
ubuntu@ubuntu:~$ php -v
PHP 8.0.8 (cli) (built: Oct 26 2021 11:42:42) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies
Here is the html with the php code :
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<?php
echo "My first PHP script!";
?>
Hello world
</body>
</html>
i loaded the file on firefox browser from local ip (192.168.x.y) and also from public ip and i got the same results. i really dont know where to start, i dont find any clue on the net.