I've recently installed Lamp in my fresh 12.04 installation. I want to know if I can move my www directory to home so I can syncronize it with Ubuntu One, or is there any way to syncronize www directory with dropbox or some other application. I just want to keep that directory syncronized with the cloud storage so I never lose the data.

Thanks in advance. :-)

  • You can as you can see in the answers but I would keep everything as is, create a cronjob to make a gzipped file and store that file elsewhere (usb stick/drive but it could also be your Ubuntu one synch dir).
    – Rinzwind
    Feb 20, 2013 at 23:06
  • If that's the case, I would suggest you to use some kind of backup system in order to backup your /var/www folder in a cloud folder. This way you can also keep also snapshots of the changes that you make to your website. Dejá Dup and Back in the time comes to my mind. Feb 20, 2013 at 23:10

1 Answer 1


The solution provided in this answer is yet effective for your needs even in Ubuntu 12.04.

Placed here for your convenience.

You can change your default folder for www content by editing the information provided inside the /etc/apache2/sites-available/default file. By dropping sudo gedit /etc/apache2/sites-available/default and changing any occurrence of the /var/www or (maybe your case) /var/www/html and setting the folder that you wish to use.

The contents of the file will look like this:

<VirtualHost *:80>
  ServerAdmin webmaster@localhost

  DocumentRoot /home/geppettvs/www
  <Directory />
      Options FollowSymLinks
      AllowOverride None
  <Directory /home/geppettvs/www/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all

  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  <Directory "/usr/lib/cgi-bin">
      AllowOverride None
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      Order allow,deny
      Allow from all

  ErrorLog ${APACHE_LOG_DIR}/error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn

  CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128


In this case I am using my /home/geppettvs/www folder in order to place the files that will be exposed to the public via http connections (port 80).

Give this a try. I hope this help you.

However, I suggest you to run a search before opening a new question. Your question may be closed as du

Good luck!

  • I did run a search but couldn't find an answer. Well, thank you so much. It worked but I preferred to keep the directory secure and set the default backup app of Ubuntu to automatically backup the data of www directory to Ubuntu one.
    – user133112
    Feb 22, 2013 at 0:15
  • Good to know it worked, and also good to know you have chosen one of the best choices for you. Anyway I suggest you to have a look at the answers of this question askubuntu.com/q/219615/9598 in order to see the differences. Good luck! Feb 22, 2013 at 1:30

You must log in to answer this question.