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?
 
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
 
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
 
Michael_SAuthor Commented:
Thanks with that little tidbit I was able to figure out why my Clean URLs in Drupal were not working!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.