Development Server: File Structure and Symbolic Links

Because the path to your files on the drupal-dev.nss.udel.edu server is complicated and difficult to remember, we suggest you set up a symbolic link to your files. Creating a symbolic link allows you to use a short alias, making it easier to use your Web site's directory on drupal-dev.nss.udel.edu.

File Structure on drupal-dev.nss.udel.edu

Your Web site's files are located in the following directory:

/opt/htdocs/drupal/sites/udel.edu.<sitename>

For example, if you are working on a site named "itcg," your site's directory would be the following:

/opt/htdocs/drupal/sites/udel.edu.itcg

This directory contains links to server-wide directories and files as well as the files and themes directories in which you, as a site administrator, can upload images, documents, other files, and themes.

Setting up a Symbolic Link to Your Web Directory

We suggest that the first thing you do after logging into drupal-dev.nss.udel.edu is to check that your directory exists and has been named properly. Next, set up a symbolic link following these steps:

  1. Log in to your drupal-dev.nss.udel.edu account as described in the directions for logging in.
  2. At the command line prompt (>), type the following command:

    cd /opt/htdocs/drupal/sites/udel.edu.<sitename>

    replacing <sitename> with the name of your site.

    In the "itcg" example, you'd type the following command:
     

    cd /opt/htdocs/drupal/sites/udel.edu.itcg  
  3. When you use the UNIX ls command to list the files in your directory, you should see a list like the one shown below:
    /opt/htdocs/drupal/sites/udel.edu.itcg
    > ls
    files settings.php settings.php~
    modules settings.php.in themes
    >
    Two subdirectories are available for you to use: files and themes. The other items are links to server-wide resources.
     
  4. The next step is to create the symbolic link for your Web directory.

    Best Practice
    We recommend that you use the last part of your directory name as the alias for your development directory. That is, use what comes after the udel.edu. part of the full directory name as the name of the link. This practice is particularly helpful if you have more than one Web site you are developing on drupal-dev.nss.udel.edu.

    Use the UNIX cd command to go back to your home directory on drupal-dev.nss.udel.edu and use the UNIX ln (link) command to create an alias as shown in the example below:

    > cd
    > ln -s /opt/htdocs/drupal/sites/udel.edu.itcg itcg
    > ls
    abcd itcg
    > cd itcg
    > pwd
    /opt/htdocs/drupal/sites/udel.edu.itcg
    >
    NOTE
    In this example, the administrator has two Web sites she is working on: abcd and itcg.

Using the Symbolic Link

After your link is set up, you'll be able to use the link with the UNIX cd command. In the example below, our sample site administrator starts in his home directory, and changes to each of his Web directories.

> cd
> pwd
/opt/home/richard
> cd itcg
> pwd
/opt/htdocs/drupal/sites/udel.edu.itcg
> cd
> pwd
/opt/home/richard
> cd cotw
> pwd
/opt/htdocs/drupal/sites/udel.edu.cotw
>

Similarly, when you log into drupal.dev.nss.udel.edu with a secure FTP client, you'll be able to use the link as an alias to your site's files, as shown in the graphic below:

 Symbolic link in SSH FTP Client