Computing
Running your web site on the Division of Archaeology’s web server¶
Introduction¶
This document describes how to FIXME. You can always obtain the latest version of this document from: http://www.arch.cam.ac.uk/comp/FIXME/
- Introduction
- Background
- File Transfer
- Changing your Password
Introduction
This document describes how to manage your personal web site on the Division of Archaeology’s web server using SSH and SFTP/SCP. It assumes that you have already created a web page using the tools available on a PWF computer, and that you need now to put the files in the right place to make them available on the World Wide Web. You can always obtain the latest version of this document from:
Background Summary
The steps toward creating a set of web pages are as follows:
- Obtain an account on the Division of Archaeology’s web server (application form here)
- Create your web pages using the tool of your choice, e.g. Notepad, TextPad, Macromedia HomeSite, Macromedia Dreamweaver, along with any desired images (list of Computing Service courses on web authoring here)
- Transfer your web pages from the computer on which you created them to the correct place on the web server
There are for advanced users alternatives to this process. You can SSH in to the web server and use either vi or pico to write HTML, or you can SSH in to the web server, run the script make-my-home.sh and then use vi or pico to adapt the results to your needs. However, you will need a basic knowledge of Unix and either vi or pico to do so. The make-my-home.sh script is documented here. Your Personal Web Site
If you have an account on the web server you will have a home directory (instructions for obtaining an account on the Department’s web server are here). This is your personal file store. The path to your home directory is:
/home/<CRSID>/
For example, my CRSID is dir21 and therefore the path to my home directory is
/home/dir21/
In your home directory is another directory called public_html and this is where your web site is stored. A file named index.html stored in public_html can be viewed using a web browser at the following URL:
http://www.arch.cam.ac.uk/~<CRSID>/
In my case:
Note the tilde (~) before the CRSID, and the fact that public_html does not appear in the URL. Also note that the filename index.html does not appear in the URL. This is because when the web server receives a request for a directory rather than a file, it will look for a file called index.html and return that. If it cannot find index.html it will return a 404 Not Found error message. If you want the web server to return a file called, say my-project.html, you will have to specify the path and filename:
http://www.arch.cam.ac.uk/~<CRSID>/myproject.html
Your Project Web Site
If you want to run a project web site, for example to promote field work you are doing, or a forthcoming conference, the easiest thing to do is to create a sub-directory in your public_html and put the web site there. When you are ready to reveal it to the world you can ask the webmaster to create an alias for it. For example, imagine I am running a conference called Small Mammals I Have Known and Loved. In public_html I create a sub-directory called smihkal and put my web site there. Once the web site is ready I send mail to webmaster@arch.cam.ac.uk saying:
From: dir21@cam.ac.uk To: webmaster@arch.cam.ac.uk Subject: Request for alias on www.arch.cam.ac.uk
Dear Webmaster
I am running a conference called Small Mammals I Have Known and Loved. The conference web site is in
/home/dir21/public_html/smihkal/Please create an alias
and announce the new web pages in the news section of the Department’s home page.
This will enable me to announce the conference web site as
in my publicity material, and also cause a link to the conference web site to appear on the Department’s home page. Before spending large sums of cash on printing publicity material check with webmaster that your chosen alias is available and will work. Please note that we are unable to arrange aliases like:
File Transfer
You may be used to using FTP (for example WSFTP LE, CuteFTP, or FTP Explorer) to move your HTML files on to the web server. We don’t do FTP any more:
- The FTP daemon (that piece of software on the server that accepts incoming FTP connections) is notoriously flaky;
- FTP sends your password in clear across the network. This is a Bad Thing;
- Also, the CS blocks incoming FTP connections so that you cannot access the server from outside the University.
Instead the server runs an SSH daemon. We like SSH, not only because the daemon is pretty reliable, but also because all traffic is encrypted. This is a Good Thing. Transferring files through SSH is done using a program called SCP (Secure Copy) or the SFTP (secure FTP) subsystem. Transferring Your Web Pages from a PWF Macintosh to the Department Web Server
Log in to a PWF Macintosh and start Fugu, an SCP/SFTP client, by clicking on the Apple menu and choosing Applications, then Communications, then Fugu:
[Screenshot]
[Screenshot]
The Fugu application will start, showing the local filesystem, and prompting you to specify the server to which you wish to connect:
[Screenshot]
Specify the server as www.arch.cam.ac.uk in the field labelled `Connect to:’, and provide your username, i.e. your CRSID. Then click the Connect button:
[Screenshot]
You will be prompted for your web server password. Do not tick the box labelled `Add password to keychain’: Enter your password and click the Authenticate button:
[Screenshot]
You will now see a window with two panes, the left one showing your PWF Home DIrectory, the right one showing your Home DIrectory on the web server. Double-click the public_html directory to enter it:
[Screenshot]
In the left hand pane find the file(s) you want to transfer to the web server. In this example my HTML file is in the folder my-website in my PWF Home Directory, so I would double-click that directory:
[Screenshot]
Once you can see the HTML file(s) in the left hand pane, click it and drag it to the right hand pane. This copies it into public_html in your Home Directory on the web server:
[Screenshot]
When the copy is complete, you should see the file appear in the right hand pane, like so:
[Screenshot]
When you have finished, go to the Fugu menu and choose Quit Fugu to log out of the web server and close Fugu:
[Screenshot] Transferring Your Web Pages From a PWF Windows PC to the Department’s Web Server
Log in to a PWF PC and start WinSCP by clicking on the Start button:
[Screenshot]
Choose All Programs:
[Screenshot]
Choose PWF PRograms:
[Screenshot]
Choose Communications and Networking:
[Screenshot]
Choose WinSCP:
[Screenshot]
WinSCP will start. Click the New button:
[Screenshot]
Specify the Host name as www.arch.cam.ac.uk, and use your CRSID as the User name. Then click the Save button:
[Screenshot]
Click OK:
[Screenshot]
Ensure that you have the correct session highlighted, as shown below, and click the Login button:
[Screenshot]
You will be prompted for your web server password. Enter it and click OK:
[Screenshot]
WinSCP will show you a window divided into two panes. On the left is the local filesystem, showing your PWF Home DIrectory, and on the right is your Home DIrectory on the web server. Double-click the public_html directory to enter it:
[Screenshot]
In the left hand pane, find the file that you want to transfer to the web server
[Screenshot]
Single-click on the file that you want to transfer to select it, and then click the `F5 Copy’ button at the bottom of the WinSCP window:
[Screenshot] Transferring Your Web Pages Fron a non-PWF Computer to the Department’s Web Server
Both Fugu and WinSCP are free software. You can download one of them and adapt the above instructions to use it from your own computer.
Fugu is for Mac OS X and can be downloaded from the University of Michigan.
WinSCP is for Microsoft Windows and can be downloaded from Sourceforge. Changing Your Password
To change your password SSH to the web server using for example PuTTy (on Windows) or JellyfiSSH (on Mac OS X). You will be prompted for your CRSID and password. Enter them correctly to login and then issue the command
passwd
You will be prompted for your existing password and then asked for a new one. After you have entered your new password you will be prompted to re-enter it for confirmation. After you have changed your password issue the command
exit
to logout and end your session.