Apache in Ubuntu: Changing location of www directory.

Hello there! I was trying to install drupal to my computer, so that I can play with its features. For your information, I am using Lubuntu 13.10 (a variant of ubuntu). For installing drupal, I needed to install LAMP on my computer, which I installed using apt-get as:

sudo apt-get install lamp-server^

(detailed instructions: http://www.howtogeek.com/howto/42480/)

Now, after installing LAMP,
I found the www directory at /var/www/

Due to write permissions, I could not copy the drupal folder into www folder. Moreover, I did somehow, further problems might arise like drupal installation might not go right.

So I decided to change the path of www directory.

-> I copied 'www' directory into my home, i.e., /home/sanjay/www

-> Right clicking the new 'www', I changed the permission to 'allow everyone to access and modify everything'.

-> I opened, /etc/apache2/apache2.conf using gvim, and changed the path /var/www/ to /home/sanjay/www

-> Finally, I opened /etc/apache2/sites-available/000-default.conf000-default.conf, and changed the line /var/www/ to /home/sanjay/www

-> I restarted apache, by typing "/etc/init.d/apache2 stop; /etc/init.d/apache2 start" in the terminal, also the simpler command is "/etc/init.d/apache2 restart". Both works.

-> I copied the 'drupal' folder to /home/sanjay/www/drupal

-> Now I opened "http://localhost/drupal/". Boom.. that worked :)

Leave your queries in comments. Thanks :)


Popular posts from this blog

C Graph implementation with adjacency list representation using structures: Data Structure Tutorial 1

Accessing DynamoDB from Spring Java application - Walkthrough tutorial

Interview Of An Indian Top Coder : Rudradev Basak