Change location of Apache2.2 doc_root on Ubuntu 6.06
By default, when you first get Apache2.2 installed and running correctly on Ubuntu 6.06, the doc_root (document root) is set to /var/www/apache2-default. That means that in order to navigate to the default page to see if your install is working, you have to go to http://localhost/apache2-default/ instead of just http://localhost. Ugh.
I don’t want to have to append the /apache2-default directory to my url when I am testing, or working with content on my Apache2.2 server. So, that value just had to be changed.
In the Ubuntu 6.06 installation of Apache2.2, the DocumentRoot value is set in file called “default” located in the /etc/apache2/sites-available directory. Presumably this file is configurable to accommodate multiple DocumentRoot values for different URLs being served by the same Apache2.2 server.
Once I had changed the DocumentRoot value in the “default” file to /var/www, I then copied all of the files in the /apache2-default directory into its parent directory one level above:
/var/www# cp apache2-default/* .
Note, that is a period at the end to signify the current directory in Linux.