-1

I had a question in this article and i did not have the answer i want but i managed to do this:

in etc/apache2/sites-avaiable/000-default.conf i changed the DocumentRoot from /var/www/html to var/www

now localhost through the browser opens www i can see the html folder and the test site folder i want, now i can act for every folder as a separate site as i do in windows so the question is what is the difference between what i have done and the ten steps way that every body trying to explain to add more sites to apache and what is the benefits of these both ways?

  • do you want to manage many local sites? like: test.local, web.local, store.local? Letizia gave you the answer, just setup every virtual hosts on apache, gives a diferent directory to each vhost and done! – tttony Aug 12 '14 at 22:17
  • You could've just left the root /var/www/html and deleted or renamed the index.html file and would have the exact same results except you'd have to put the files in /var/www/html/ instead of /var/www/. The "it works" page explains this newly added difference. – mchid Aug 12 '14 at 23:11

1 Answers1

0

Difference is in the number. Now you have one, default web host. And if it suits your needs it's perfectly fine. Benefit is when you want to run several web hosts on the same system, ie when you work on projects for several different clients and each of them needs different environment (apache settings, web app etc).

rsm
  • 191