Configure Apache/MySQL/PHP on Windows

Posted on Updated on

For novice only, I remember I found this article three years back. We must be thankful for Dr. Robert Kline for the generous contribution of this article for its’  timely updates. This online guide is the most updated wamp configuration guide. I have written a easy guide for Ubuntu. This is the best guide for windows. Read it.


Configure Apache MySQL PHP (LAMP) on Ubuntu 12.04

Posted on Updated on

There are many ways to do this but I’ll share the best and the  a easiest way to configure Apache MySQL and PHP (LAMP) on your Ubuntu. this is for Ubuntu 11.04

1. Go to applications->accessories->terminal

2. Enter Following commands accordingly,

sudo apt-get install tasksel

sudo tasksel install lamp-server

3. Give the MySQL root password, that’s all

4.  We want the default site to be /home/YourUserName/sites/. To do this, we must create a new site and then enable it in Apache2.

To create a new site:

Create a new folder called sites in /home/YourUserName

Copy the default website as a starting point.

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite

5. gksudo gedit /etc/apache2/sites-available/mysite

6. Change the DocumentRoot and Directory to point to the new location. For example replace /var/www/ it with /home/YourUserName/sites/.

Now changes should be as follows,

DocumentRoot /home/YourUserName/sites

<Directory />
Options FollowSymLinks
AllowOverride None
<Directory /home/YourUserName/sites/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

7. Change the Directory directive, replace to

sudo a2dissite default && sudo a2ensite mysite

8. Finally, we restart Apache2:

sudo /etc/init.d/apache2 restart

9. Click here http://localhost/

10. So It Works!