On my rhel 7.2 system, I finished installing Apache 2.4.46 and PHP 7.4.19. However, when I start apache and access to my own php file, it shows source code instead of executing it. I find some solution on the Internet and try some changes in httpd.conf file such as adding this:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
and
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
unfortunately, it doesn't work. I realized that it does not have file "php.conf" in folder /etc/httpd/conf.d or file libphp7 in any folder.
So, how can I address this problem. Hope you guys would help me. Thank in advanced!!!