Personal web pages
If you have an account on a machine in
you can export personal files to the World Wide Web.
Static web pages
The HTML pages and any other files you wish to export should be
placed in a directory called
public_html in your
directory. By default this will be set up to be a symbolic link
public_html in your Unix home directory.
In other words, Unix users can place files for the web server into
after creating that directory.
If you use Windows, you can access your Unix home directory at
Alternatively, you may prefer to put the
folder directly into the
The files and all directories leading to them must be publicly readable, which implies that you cannot use the default setup if your home directory has been protected against public read access.
You can then publish URLs of the form:
(or replace '~your-login-name' with
to refer to the file that you call
Subdirectories will work as expected. A URL of the form
will automatically pick up a file called
it is a good idea to have such a file to index your other pages. If no
such file exists, then the server will invent an index based on what
it finds, but this is unlikely to be as helpful as something you write
You must be careful about what you export. Anything you place in
public_html directory is quite literally world
(although there are access controls available).
Do not export copyrighted material without permission of the
copyright holder. Do not export things which may be considered
offensive. Do not expose to world view information which may
compromise the security of the Lab's system.
An explicit restriction is that you should not set up links from
public_html area to files that you do not own. For
technical reasons we do not enforce this rule at present, but reserve
the right to do so in the future.
The personal public_html directory is best reserved for material which is genuinely personal, such as your CV. Do remember that these pages will disappear when you leave the Computer Laboratory (though we will be willing to set up a redirection to your new server).
If you find yourself setting up something relating to a research
group, or a more general area of interest, you should think again, and
pagemaster whether it would be more appropriate to
set up an area specifically for that purpose.
If you set up a
public_html/index.html file, a link to
it will automatically be created in
the list of members of the
department when the page is next regenerated (usually overnight).
If you do not want to host your home page
on your normal Computer Laboratory home directory, but you still
want it to be accessable from
the people page, then
create an empty file
public_html/index.html (to cause a
link to be created on the people page) and also create a
public_html/.htaccess containing the line
Redirect /~your-login-name http://your.home.page.url
When you leave the department and you
are about to lose your login, send your preferred
Redirect /~your-login-name http://your.new.home.page.url
directive to webmaster@cl (and your email forwarding address
to postmaster@cl), who will preserve it in a main config file.
Dynamic web pages
For reasons of performance, reliability and security, our main web server www.cl.cam.ac.uk does not execute user-provided code (CGI, PHP, SSI, etc.) on personal pages.
If you run a web server on your own machine in the Computer Laboratory, where you can enable dynamic pages, it will usually not be reachable from the outside world, because our firewall blocks most incoming connections by default. It is possible, however, to use our main web server www.cl.cam.ac.uk as a gateway (“reverse proxy”) to your own web server, using a .htaccess file that uses the RewriteRule directive with option P, as explained in the Apache 2.2 mod_rewrite documentation. This allows web pages served by your own web server to be accessed by an outside user with a URL starting with http(s)://www.cl.cam.ac.uk/.
We operate – currently on an experimental basis – additional departmental web servers that have CGI and PHP execution enabled. To use this facility, create a directory
which will then become visible (this may initially take an hour) on the web as
and on the www-dyn servers as
Any CGI or PHP scripts placed there will be executed on the respective server under the user’s credentials. The script files must be writable only by the owner; in particular having the files group writable will lead to an "internal server error". When running, the scripts have read/write access to the contents of /auto/userfiles/*/dynamic_html/, but they have no access to most of the remaining departmental filespace (because the art of writing secure CGI or PHP is a notoriously rare skill).
Files in /auto/userfiles/$USER/dynamic_html/ other than those in public_html/ will not be directly visible via the web interface, but note that any user can expose them by creating a symbolic link in their dynamic_html home directory to /home/$USER/ so do not assume that they are "secret".
The service is actually provided by a number of hosts with names of the form www-dynN, e.g. www-dyn2.cl.cam.ac.uk. To reduce the chance of systematic failure, the hosts use different operating system version; at the time of writing www-dyn1 is Fedora Core 6 and www-dyn2 and www-dyn3 are Fedora 9, but note that the number of machines, their names and their operating system may change. Please try your code on all servers, and if it does not run correctly on all, please contact webmaster.
Some further technical details and helpful hints will be found on this wiki page.
There is – also on an experimental basis – a departmental MySQL database management system service available that can be used to provide persistant storage to web applications.
The address mysql-serv.cl.cam.ac.uk will access one of the two server replicas mysql-serv0 or mysql-serv1. Ask sys-admin for a database user account of the form "$USER_$APPLICATION" and an associated password).
A comfortable database management user interface is available at: https://www-dyn2.cl.cam.ac.uk/phpMyAdmin/
Other local hosting services
Several other organizations within the University host web pages or applications for any University member, or offer ready-to-use content management systems:
- DS-Web – the web server offered by the Computing Service to users of its Managed Cluster Service (formerly known as PWF)
- Managed Web Service – a web server with CGI/PHP/MySQL run by the Computing Service
- Managed Wiki Service – a MediaWiki hosting service run by the Computing Service
- Falcon – a Plone hosting service run by the Computing Service
- SRCF – a student-run Linux-based web server providing a comprehensive LAMP service