Managing sub directory in Apache2 / Ubuntu

Trying to figure out how Apache2 maps a url to a specific directory.

Using http://{my_server}/drupal6 I get to my Drupal site.  What I am trying to figure out is how does Apache know how to map drupal6 to my actual directory?  

http://{my_server} maps to the default directory of /var/www but /var/www does not contain the drupal6 sub directory.  The actual Drupal directory is in /usr/share/drupal6
Michael_SAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

deisrobinsonCommented:
Check your virtual hosts file, you'll see something like this:

 NameVirtualHost *

    <VirtualHost *>
    ServerName www.domain.tld
    DocumentRoot /www/domain
    </VirtualHost>

    <VirtualHost *>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain
    </VirtualHost>

File name should be similar to vhosts.conf .
This will tell apache to map a directory to an address.
0
Michael_SAuthor Commented:
Cannot find any vhosts file on my server.  Apache is installed in /etc/apache2 and the only .conf files there are posts.conf, httpd.conf which is empty and apache2.conf.  

There is a config.d directory that have a drupal6.conf link to /etc/drupal/6/apache.conf file. This file contains the following:

Alias /drupal6 /usr/share/drupal6

<Directory /usr/share/drupal6/>
Options ...
</Directory>

Is this where the connection is being made?

Michael.

0
deisrobinsonCommented:
Well there you have it. That is were drupal is telling apache where the alias is and where to find and point /drupal6 to. That should answer your question.

For example if you moved your installation  you would change that file to


Alias /drupal6 /mynewdirectory/drupal6

<Directory/mynewdirectory/drupal6/>
Options ...
</Directory>

and Apache will point /drupa6 to the new directory.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael_SAuthor Commented:
Thanks with that little tidbit I was able to figure out why my Clean URLs in Drupal were not working!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.