- You will need to give others execute access to
your Home Directory. If you have registered as a PIP using
pip_reg then your Home Directory will be given this access.
Once you have logged in, you can do this using the UNIX command:
chmod o+x ~
where ~ stands for your Home Directory.
i.e. you actually use the ~ character rather than replace it
with the name of your Home Directory.
- Create a directory called
public_html immediately beneath your Home
Directory. This will not be necessary if you have already registered
as a Personal Information Provider using the pip_reg command
as this will be done for you.
This can be done using the UNIX command:
mkdir public_html
You must then give others (i.e. the world) execute access to this
directory. If you have registered as a PIP using pip_reg
then your public_html directory will be given this access.
This can be done by using the UNIX command:
chmod o+x public_html
If you do not have an index.html file (or link) and you require the
server to deliver a UNIX-style directory listing, then you must give
others read access to the directory. If you have registered as a PIP
using pip_reg then your public_html directory will
be given this access.
This can be done by using the UNIX command:
chmod o+r public_html
As an aside, this would then allow other SUN7 users to see the directory
listing using the UNIX command, ls.
- All documents that you wish to publish must be
located in your public_html directory or below.
To `move' to this directory from your Home Directory, use the UNIX
command:
cd public_html
If you create further directories beneath
public_html, then you must give others
execute access to them in the same way as you did with your
public_html directory. The earlier note on whether or
not read access is required applies as well.
It is also recommended that you build a link, called
index.html. If there is a principal document (or Home Page)
in this directory then use its filename in the link command. If not,
construct a new document, itself an HTML file, which simply informs
the caller that no further information is available. Use this new
filename in the link command.
- Create a document to describe what is available
and provide links to Web documents elsewhere. This is an HTML
document. You must give others read access to this and any other
files you create.
The principal document in the public_html directory
is known as the Home Page. If you wish to nominate a document as the
one callers are given by default, then the Home Page is the one to
choose.
The name of your Home Page in the public_html
directory should have a prefix of either homepage, or
home and a suffix of either html or
htm. This allows for files created on some PCs (where
the prefix and suffix have a maximum of 8 and 3 characters
respectively) to be uploaded onto the SUN7 without the need to rename
them.
- Each file uploaded to the SUN7 machine must be
given an appropriate file access setting allowing it to be read by
the Web Server program.
This can be done using the UNIX command:
chmod o+r filename
where filename will be something like homepage.htm.
If you wish to set this file-permission for all files in a directory,
simply use the UNIX command:
chmod o+r *
Note:You could slightly modify this command as
follows and add it to the .profile file in your
Home Directory.
chmod o+r public_html/*
Then, whenever you log in, the commands in .profile
will be run automatically. So, after uploading a batch of files from
your PC or Mac, you need only log in to the SUN7 and then immediately
logout (using the exit command).
- All URLs to your documents will begin with:
http://web.bham.ac.uk/linkname/
where linkname is based upon the Email Address specified at
the time you used the pip_reg command to register as
a PIP.
In general, this will be either the Mailbox name, taken from your
Central Mailname, or your SUN7 UserId. The examples below show how the
linkname is used in a URL.
- The URL of the Home Page for the SUN7 user,
jonesjo, could be:
http://web.bham.ac.uk/jonesjo/homepage.htm
If jonesj gave her Central Mailname, J.O.Jones, when using the
pip_reg command to register as a PIP, then the URL
will be:
http://web.bham.ac.uk/J.O.Jones/homepage.htm
Please note that the alternative (all lower-case) URL:
http://web.bham.ac.uk/j.o.jones/homepage.htm
may also be used.
- It is recommended that your create a link to your
Home Page using the UNIX command:
ln -s filename index.html
where filename is the name of the file which you wish to be
delivered by default, i.e. when a caller uses a URL which does not
terminate with a filename.
If this file is in any other directory (below public_html)
then you can choose any name
If you have a link as described above then the URL may be written simply as:
http://web.bham.ac.uk/linkname
where linkname is either jonesj, J.Jones or j.jones
If a caller omits the filename part from the URL, then the server will
first look for a file called index.html. If
index.html points to the Home Page, then that
effectively becomes the default.
If there is no index.html present, then the server
will provide what is more or less a UNIX directory listing. This could
include old versions of documents or ones not yet ready for
release. Thus it is good practice to avoid this happening by including
the link.
- Access to documents can be permitted or denied
according to the network address of the Web Browser making the
request. Access control is based upon a per directory mechanism.
Thus, to apply restrictions to a particular document you will need to
do the following:
- Create a separate directory.
- Place the document in it.
- Create a file called .htaccess in this
directory with appropriate instructions.
- According to the type of restriction used, you may need to
create files called .htpasswd and .htgroup.
NOTES:
- Restrictions defined in the control file apply to ALL documents in
that directory.
- Documents needing different restrictions will need to be placed in
another directory with the appropriate .htaccess control
file.
A detailed discussion may be found in the document,
Restricting Access to Web Pages.
- If you'd like to see details of who has been
accessing your documents using the
PubStats Service.
- If you want to publish information related to a
community group or student society you're involved in, then you may
like to consider the following scheme which gives you a neater URL to
quote.
Suppose you wish to publish information for a student society, say the
Mexican Society, then you could create a sub-directory called
MexicanSociety in your public_html
directory. The Webmaster could create an additional Linkname, called
MexicanSociety which points to this sub-directory.
(The sub-directory and link names need not be the same though it's
recommended.) Hence, the URL which points to the Mexican Society pages
would be:
-
http://web.bham.ac.uk/MexicanSociety
To make matters more convenient, the Webmaster could also create a
further Linkname, mexicansociety, pointing to the
same sub-directory. If callers then typed a purely lower-case URL
(which some are inclined to do) they would still get to the correct
page.
This scheme has a major advantage in that should you need to transfer
responsibility for publishing the information to someone else, the URL
can still be used. After the web pages have been moved to the other
person's account, you should then ask the Webmaster to remove the
existing Linkname and define a new one.
This scheme easily extends to allow one person to publish information
for more than one such group.