I am new to PHP, and relatively new to Apache.
For my server, I am using a raspberry pi running Ubuntu MATE, which (as far as I know) is just Ubuntu with a different desktop environment. I have PHP installed, and the file I'm serving is a .php file, NOT html.
I am trying to execute PHP code on my test page, which is just served locally. I know that I need to edit the config file for Apache in order for it to run, but I don't know how; all of the various answers and articles I have looked at the past few days are either for Windows or for a much older version of Apache. I have tried many of them, and they all either result in nothing changing or an error when trying to restart Apache.
The PHP code I'm using looks like this:
<!DOCTYPE html>
<html>
<body>
<?php
echo "Hello!";
?>
</body>
</html>
Looking at the inspector in Firefox, the PHP code is commented out, a clear indication that it is not being executed.
Thank you for your help.