Please report any bugs or inaccuracies to www@demon.net
This document explains how you can directly maintain your own web space on Demon's WWW server.
Demon's WWW server is based on a HyperSparc server, running Solaris 2.4 (a version of the UNIX operating system). In order to work on the server, you will need to learn and use some UNIX commands. This document is not a tutorial on UNIX; although some relevant commands are listed, if you need further information you should either read a book about UNIX or consult one of the on-line references mentioned in Commands available.
When you obtain your web account, you will be given a login name and password on www.demon.co.uk. You can use this name and password to log into your own area on the web server (using a telnet application).
This account is strictly limited in what it can do, although there are enough commands available to allow you to maintain your WWW space.
The login name of your account is the same as the name of your home directory (that is, the directory named in the URL of your site). For example, if the URL of your site is http://www.demon.co.uk/web-site/, your login name is web-site.
Site names can be more than eight characters long. However, the maximum length of a login name is eight characters. Therefore, if your sitename is more than eight characters long your login name will consist of the first eight characters of your sitename.
Before you first log in, we will assign you a password. You should keep this password secret; anyone who knows your password and login name can log into www.demon.co.uk and modify your files. If you cannot log in, or if you password becomes compromised, please contact us directly.
The upload procedure consists of two steps:
In your home directory, you will find a directory called incoming. You must upload your files into incoming.
To unpack your archive, telnet to www.demon.co.uk. (To do this you will need a telnet program. If you are using the DOS based Demon dialup system you can issue the telnet command from the net> prompt:
net> telnet www.demon.co.ukIf you are using a Windows based system then you should get a telnet program such as wtel1b2.zip
If you are using a Macintosh, you can use NCSA Telnet (or another commercial telnet application).
When you are logged on to www.demon.co.uk, type ls to obtain a directory listing. You will see that you have a number of directories. These are:
A diagram of this structure, for the example site web-site, looks like this:
Figure 1: web-site | +------------+------------+ | | | incoming cgi-bin docs | +--------+---------+ | | | more-docs images sounds
The docs directory is a link to your top level directory in our
WWW space. This means that any HTML file placed in docs
appears on the web in
http://www.demon.co.uk/web-site/
.
For example, if you place a file called test.html in
/web-site/docs it will have the URL
http://www.demon.co.uk/web-site/test.html
.
If you move test.html from /web-site/docs into
/web-site/docs/more-docs, it will have the URL
http://www.demon.co.uk/web-site/more-docs/test.html
.
(In effect, the directory name docs is invisibly removed from any URLs pointing to your site.)
Note: the UNIX system does not permit deleted files to be undeleted! Use rm with caution!
There are a number of ways in which you can archive files to be placed on your WWW site. These include:
Some people choose to send up their complete WWW site each time, while others just upload the modified files.
All of these methods are valid. You have the freedom to choose how you carry out your uploads. However, we would like to make a number of recommendations that will help you to maintain your site with as little trouble as possible.
We recommend that you create your archive from within the top level directory. The following example illustrates this.
Figure 2: web-site | +--------+---------+ | | | docs images sounds
As you are now the maintainer of your own WWW site you can upload an archive, or indeed individual files, in any file format you require - as long as you are able to extract that archive on our server.
If your software does not allow you to create an archive from within a sub-directory then please let us know.
cd docs tar cvf /tmp/web-site.tar .The archive named web-site.tar is created in /tmp. It contains all the files and directories in the current directory.
To create a compressed archive (which may upload faster) you can gzip or compress the file. Using GNU tar and gzip on a UNIX system:
tar zcvf /tmp/web-site.tar.gz . or tar zcvf /tmp/web-site.tgz .
If you are using a more traditional tar product then you should pipe the output into the compression program as follows:
tar cvf - . | gzip -c /tmp/web-site.tar.gz tar cvf - . | compress -c /tmp/web-site.tar.gz
To create an archive of files that you have changed since a certain date:
cd web-site tar cvf /tmp/web-site.tar `find . -mtime +X -print`(X is a number: any file modified less than X days ago will be selected.)
On a PC running DOS/Windows, use the following commands:
cd web-site pkzip -rp \tmp\web-site *.*(You can obtain a copy of pkzip here.)
To create an archive of files that you have changed since a certain date, use the following commands:
cd web-site pkzip -rpt[date] \tmp\web-site *.*
On a Macintosh, you should create a tar archive using suntar. To create an archive:
You would then upload this file to your incoming directory on www.demon.co.uk. If using Fetch, send the file as "Raw Data".
Once the archive has been produced and ftp'd to www.demon.co.uk (in binary mode), you have to extract it. How you do this depends on the process used to create it.
The first stage is to uncompress your tar archive (if you compressed it before uploading it).
You can uncompress a file compressed with gzip or compress using the gunzip command. For example:
gunzip incoming/web-site.tar.gz
To extract the archive, change directory to your docs directory and untar the file. For example:
cd docs tar xvf ../incoming/web-site.tar
Your site has now been updated.
To extract the archive, change directory to your docs directory and unzip the file. This will extract all the files into your current directory. If you created this archive on a DOS/Windows platform then you will have to convert the file names from htm to html. This is done using the
htm2command.
For example:
cd docs unzip -d ../incoming/web-site.zip htm2Your site has now been updated.
If for some reason you need to change the access permissions on one of your files, use the chmod. Your files must be world-readable, otherwise the WWW server will be unable to service requests for them. Your directories containing files must be readable and world-executable otherwise the WWW server will be unable to see files inside them. For a discussion of UNIX file access permissions, see Controlling access to your files and directories.
If you want to restrict access to a file (called file_name), issue the following command:
chmod 0 file_name
(That is a zero, not a capital 0). This command ensures that nobody, including yourself, can access this file via the Web.
To allow anyone in the world to read the file, use the following command:
chmod a+r filename
If you use CGI scripts then they must be executable. To do this issue the following command:
chmod a+rx script_name
If the script updates a file, then you have to set write permission on the file. Use the following command:
chmod a+w file_name
TO remove files use the rm command. No "undelete" command is available; be careful!
For example:
rm file_name
To remove a directory, and all the files and directories in it, use the following variation:
rm -r directory_nameNote that the -r option recursively deletes directories stored below directory_name. So if you issue it in your home area, it will destroy your files.
To find out how much Web space you are using you would use the following command.
du -sk docs
This will give you the number of 1Kb blocks that your pages occupy. Please try to keep this within your payment limits. If you exceed your payment range (for example, by using more than 5000 blocks on a £25-per-month account) you will be billed for the extra space used.
Back to the Demon Web Main Page
or
back to the Demon Internet Main Index.
These pages are maintained by Foresight Interactive Services. If you have any queries or comments about the Demon World Wide Web pages, please feel free to email webdemon@foresight.co.uk.