So I'm new to server setup and I'm trying to get PHP 7.2 to run on an Ubuntu 18.04.3 LTS-based Apache2 server. I have a simple phpinfo file:
<?php phpinfo(); ?>
which, when visited in a browser, downloads the file instead of running it.
Below are all of the steps I've followed thus far:
httpd.conf was not present; I created it manually and added the following lines to it:
AddHandler application/x-httpd-php .php .phtml
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
apache2.conf:
...
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Any ideas as to what I might still be missing?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.