1. Install Apache server
sudo yum install httpd mod_ssl
Configuration file is by default located in
/etc/httpd/conf/httpd.conf, where root directory, port, etc. can be changed.
The follow command can setup httpd service as auto startup:
chkconfig httpd on
2. Install PHP
yum install php
3. Start the Apache server
service httpd start
4. Create a sample php file in the root directory. The default root directory configured in
/var/www/html/. Creating a file with the following content, and name it as info.php.
<?php phpinfo(); ?>
5. Try accessing the file in browser.