Install Apache and test PHP

Under fedora, install apache


sudo yum install php

Then, you should edit httpd.conf in /etc/httpd/conf and add


AddType application/x-httpd-php3 .php3

or equivalent

Then, under Fedora, go to system/service and start the httpd service. Alternatively type


sudo service httpd start

Finally, create a PHP script, called test.php, as follows (and copy it to /var/www/html/):


<?php
phpinfo();
?>

Then, to see the results, open the following URL http://localhost/test.php

Please follow and like us:
This entry was posted in Computer Science, Linux and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *