Apache is only responsible for processing requests and returning responses. It does not have the function of parsing PHP itself. You need to install PHP, allow Apache to call PHP (install the PHP module), and write the configuration file. In this way, when you request a PHP file, Apache recognizes that it is a PHP file, and then hands it to the PHP module for processing. After processing, Apache will generate a response from the PHP processed output information and return it to your browser.
Just reinstalled this afternoon. Just because you have installed apache does not mean that you have installed php, so you still need to continue apt-get php/php5, and maybe mysql. Search for tutorials on the Internet and follow the installation.
Apache is only responsible for processing requests and returning responses. It does not have the function of parsing PHP itself. You need to install PHP, allow Apache to call PHP (install the PHP module), and write the configuration file. In this way, when you request a PHP file, Apache recognizes that it is a PHP file, and then hands it to the PHP module for processing. After processing, Apache will generate a response from the PHP processed output information and return it to your browser.
Correct answer upstairs, you need php-fpm or Apache php module, etc. to parse PHP
Just reinstalled this afternoon.
Just because you have installed apache does not mean that you have installed php, so you still need to continue apt-get php/php5, and maybe mysql. Search for tutorials on the Internet and follow the installation.