I think your php installation with apache is wrong. That is why you do not see any php page on your web server. Clean up remove all existing applications like httpd, php, php-fpm, php-cli, etc. And try to clear isntall in this order
yum install httpd -y yum install php php-common php-cli php-gd php-curl php-fpm -y
then make sure you restart the httpd server.
service httpd restart
Install mod_fastcgi:
yum install mod_fastcgi
Start the service:
service php-fpm start
Restart Apache:
service httpd restart
5. Apache configuration with PHP-FPM
Open the fastcgi.conf file:
nano /etc/httpd/conf.d/fastcgi.conf
Add this to the end of the file:
<IfModule mod_fastcgi.c> DirectoryIndex index.html index.shtml index.cgi index.php AddHandler php5-fcgi .php Action php5-fcgi /php5-fcgi Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization </IfModule>
After this search after โFastCgiWrapperโ and make sure it is set to โoffโ, then save the file.
The / usr / lib / cgi-bin / directory must exist, so we create it:
mkdir /usr/lib/cgi-bin/
If mod_php is installed and enabled, we need to disable it, so open the configuration in /etc/httpd/conf.d/php.conf:
nano /etc/httpd/conf.d/php.conf
Comment on the AddHandler and AddType lines so that they look like this:
#
Save the file and restart Apache:
service httpd restart
DeSmOnd
source share