PoiNtEr->: apache and Php5 in ubuntu

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Thursday, December 30, 2010

apache and Php5 in ubuntu


Step 1: install Apache2:

sudo apt-get install apache2

And you get apache2 installed as well. To double check, point your browser to http://localhost, and you should see the Apache2 placeholder page like this.

Step 2: To install support for PHP, do the usual

sudo apt-get install php5 libapache2-mod-php5

To verify that everything installed correctly and php support is enabled, you need to restart apache by doing this

sudo /etc/init.d/apache2 restart

Create a test php file called info.php, using a text editor of your choice (say gedit)

sudo gedit /var/www/info.php

and paste the following content and save the file

<?php

phpinfo();

?>

Now open the following page http://localhost/info.php and you should see something like this

No comments:

Post a Comment