Making your own files accessible on the Web

Basics

The folder Sites in your home directory (hey, that’s Apple’s idea of an intuitive name, not mine!) serves as a public web site. Any files you put there will be accessible over the web.

So, to put files there, you’d place them (or a copy of them) in the Sites folder in your home directory on anulap.

To access them over the web, you’d visit the following URL in a web browser: http://atiniui.nhm.org/~userid where userid is your short login name. NOTE that the server name for web access is atiniui.nhm.org, not anulap.nhm.org. Atiniui is still our web server and will grab the files from anulap to serve them over the web.

Clarification

It helps to think of this as two different ways to “see” exactly the same files:

  1. Through the Mac server anulap (where you can read and write your files).
  2. Through a web browser (where you (or anyone) can only read the files).

As an example, the image on the left is what one might see in one’s Finder file browser, after two image files (6510.jpg and 6515.jpg) were put into the Sites folder in a home directory. The image on the right shows how visiting that over the web would look. In this case dean is the userid for the account.

Mac Finder view Web browser view
Mac Finder view of files, accessed by logging onto a Mac Web browser view of files, accessed by visiting http://atiniui.nhm.org/~dean

The Mac Finder file view is accessed from your home account by logging onto a Mac and manipulating files there. The Web browser view is accessed from anywhere using a web browser, using the URL http://atiniui.nhm.org/~userid where userid is your short login name.

The web server (atiniui.nhm.org) actually reaches behind itself to the anulap.nhm.org file server to grab the files from your Sites directory and serve them through the web server. That way we only maintain one web server, but let you put files on your home directory on anulap that you can make accessible via the web server, atiniui.

Specifics

A few details:

  • Make sure the files you put in your Sites folder are readable by the web server program. They must be readable by “Others” for that to work. To check or change that:
    • Highlight the file in a Mac Finder file browser.
    • Use File → Get Info... to see the file information.
    • Click next to “Details:” at the bottom of the box, under “Owership & Permissions:”
    • Make sure that it is set this way: Others: Read only
  • If you had files on atiniui in the old days, I (probably) have migrated them for you, so they’re in your Sites folder already.
  • If you haven’t used this facility before, there will be a few files automatically supplied by Apple that you can delete:
    • index.html is the web page that will be shown by default if it is present. If you’d rather people just saw a listing of the files in the directory (like the example above), you must remove or rename the index.html file.
    • images contains a few (essentially useless) images used on the index.html page.
    • Streaming is supposed to support your cool streaming media (web DJ anyone?). We don’t go there.
 
systems/homeweb.txt · Last modified: 2005/12/15 16:38 by deanpentcheff
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki