Indiana University
University Information Technology Services
  
What are archived documents?

ARCHIVED: How do I create subdirectories of my www directory for my web pages?

Note: On June 23, 2008, UITS will retire Steel. As part of this process, UITS will move the Mypage service to a new platform. For more, see About the Mypage migration.

The procedure for creating a subdirectory of your www directory is similar to creating any other directory in Unix. From the Unix prompt, enter:

mkdir ~/www/directoryname

Replace directoryname with the name of your subdirectory.

If you wish to make a subdirectory of www available to web browsers, the subdirectory and the files within must have their permissions set so that the rest of the world can access them.

At Indiana University, on Steel you can do this either by running spinweb in recursive mode, or by using the chmod command.

To run spinweb in recursive mode, enter spinweb -r . This will automatically set the correct subdirectory and file permissions for any subdirectories you have created, but you must run it again every time you create any new subdirectories.

To use chmod to set permissions, follow these steps:

  1. To set the correct subdirectory permissions, enter: chmod 711 ~/www/directoryname

    Replace directoryname with the name of your subdirectory.

  2. To set the correct permissions for files within subdirectories, enter: chmod 644 ~/www/directoryname/filename

    Replace directoryname and filename with the subdirectory and filenames, respectively.

You can also create and use subdirectories of subdirectories, as long as you set the correct permissions for all nested directories and the files within them.

When accessing files within a subdirectory of your www directory via HTTP, the URL takes this form:

http://mypage.iu.edu/~username/directoryname/filename

Replace username with your username, directoryname with the name of the subdirectory, and filename with the name of the file within the subdirectory. You should not include the www directory in the path of the URL. For example, the URL for the image helmet.jpg in dvader's ~/www/graphics/clothes/ subdirectory would be:

http://mypage.iu.edu/~dvader/graphics/clothes/helmet.jpg

Note: At Indiana University South Bend, the Mypage service is different from the Mypage service mentioned in this document. For more information, see IUSB's Web Publishing: Mypage page.

Also see:

This is document beio in domain all.
Last modified on June 23, 2008.
Please tell us, did you find the answer to your question?