Home > Apache, how do I?, ubuntu > Change location of Apache2.2 doc_root on Ubuntu 6.06

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.

Summary:

File: default

Location: /etc/apache2/sites-available

Advertisements
Categories: Apache, how do I?, ubuntu
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: