The Managed Web Service (MWS) described here replaces an older one run by University Information Services (and previously by the University Computing Service). This older service will be shut down during 2016. If you have sites that are still using the older service then you need to make alternative hosting arrangements. There are three alternatives:
- You might want to transfer your site to this new version of the MWS, and this page contains some advice on doing this.
- You could transfer your site to some other service inside the University or outside.
- You could delete the site.
The old service will close at the end of September 2016. When this happen, any sites still hosted on it will stop working and their content will become inaccessible. Providing you have let let email@example.com know about your transition plans then you have until the end of September to complete them.
However if you haven't contacted us by the end of June 2016 we will assume that you no longer want any sites and we will shut them down during the week beginning 4 July 2016, at which point your sites will stop working.
The old and new MWSs are sufficiently different that it's not possible to automatically transfer sites from one to the other. Neither is it possible for UIS to do the transfer for you. However a webmaster or developer familiar with existing sites should have no particular difficulty in performing a transfer. While the procedure will be different in each case, it will generally involve the following steps:
1. Create a server on the new MWS
You can create a server on the new MWS by visiting the control panel at https://panel.mws3.csx.cam.ac.uk/ - see Managing servers. Each server hosts a single web site by default but you can add more, for example if your old site had multiple virtual hosts - see Managing sites.
You'll need to give each new web site a hostname, but you shouldn't use the hostname of a site that you are transferring until you are sure you are ready. Until then you could use a new name based on the site you are transferring, for example new-www.botolph.cam.ac.uk if you were transferring the existing site www.botolph.cam.ac.uk. Or you could use a name ending .usertest.mws3.csx.cam.ac.uk, which are all reserved for testing. See Hostnames on the Managed Web Server.
You can log in to your new server using SSH and your standard UIS username and password using the hostname displayed on its control panel - see Connecting to servers and transferring files.
2. Claim your discount
Servers on the new MWS normally attract a charge of £100/year. Until October 2016 this charge is waived for servers supporting sites moving from the old MWS, however you need to contact firstname.lastname@example.org with details of the old and new servers so that the discount can be applied. If you don't, the system will automatically try to bill you from the date you created the server.
3. Transfer web pages and other content from the old MWS
To do this you will need login access to the old site. If you don't have this you'll have to ask one of the existing administrators of the old site to set this up for you. They can do this by completing a copy of the form at http://userforms.csx.cam.ac.uk/webserver/. If you don't know who the administrators are then please contact email@example.com.
The old MWS uses standard UIS usernames but different passwords from other UIS services. You'll have been sent an initial password when you first became a user of the old MWS. If you've forgotten this password or it doesn't work please ask firstname.lastname@example.org to reset it - a new password will be posted to you.
The directories used to store content have different names on the old and new MWSs:
|Old MWS||New MWS|
|'Main' or 'Default web site||/site/htdocs/||
Other virtual host
How you actually transfer content is up to you. You could
- use a file transfer program to copy all the content from the old site to your local computer and then transfer it from there to the new site
- use scp, sftp or rsync to copy it directly from the old server to the new one
- create a 'Zip' or 'tar' archive of the content and transfer that to the new server and expand it there
If you use .htaccess files to control access to sections of your site, you may need to alter the syntax used in them as the new MWS uses Apache 2.4, and the old MWS used Apache 2.2. See the "Authorization" section of Upgrading for more details.
4. Transfer database content from the old MWS
If your site stores content in a MySQL database then you need to create a database and appropriate database users on the new MWS and transfer the content to it. Neither MWS provide graphic tools such as phpMyAdmin so you need to do this work using the 'mysql' and 'mysqldump' command-line tools.
You will need to know
- the 'MySQL root password' for MySQL on the old and new servers
- the name of the database (or possibly databases) to transfer
- which database users with what passwords and permissions are required on the new site
See MySQL on a Managed Web Server for information about MySQL on the old MWS, and MySQL for similar information about the new one. This includes how to find out the database root passwords and how to reset them if lost.
You may be able to work out which databases your software uses from its configuration. For example Wordpress stores the name of the database it's using in the wp_config.php file. Alternatively the 'SHOW DATABASES' MySQL command will show you the names of all the databases currently in use:
$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.5.49-0+deb8u1 (Debian) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | dumps | | mysql | | performance_schema | | wp_truffle | | wpmytest | +--------------------+ 6 rows in set (0.00 sec) mysql> quit Bye $
Establishing what database users are required, what passwords they should have and what permissions they need may be difficult. The software configuration on the old server or the installation documentation for the software in use should provide the information needed.
Once all this information is available, one way of transferring the data is:
1. On the old server, dump the contents of the relevant databases to files (replacing <database> as necessary):
$ mysqldump -u root -p --opt <database> > <database>.sql
2. Transfer the extracted files to the new servers (replacing <database> and <123456> as necessary)
$ scp <database>.sql mws-<123456>.mws3.csx.cam.ac.uk:
3. On the new server, create empty databases as needed and restore the data into them(replacing <database> as necessary):
$ mysqladmin create <database>
$ mysql -u root -p <database> < <database>.sql
$ mysql_upgrade --force -u root -p
4. Create a database user and grant them suitable permissions on this database, probably by using the GRANT command in the mysql command line tool. See your CMS or web software documentation for details, but for example (replacing <database>, <user>, and <password> as appropriate):
$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 on sever version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> GRANT ALL PRIVILEGES ON <database>.* TO "<user>"@"localhost" -> IDENTIFIED BY "<password>"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> EXIT Bye $
5. Deploy your new site
Once you are happy that your site is working satisfactory under its temporary name you can bring it into production by renaming it. For example if your new site is currently new-www.botolph.cam.ac.uk then you can add www.botolph.cam.ac.uk as a new hostname (see Managing sites and Hostnames on the Managed Web Server). For names ending '.cam.ac.uk', the DNS will be automatically updated to direct traffic to your new server. For other names you will need to arrange to update the DNS yourself (see Routing requests to MWS servers).
Note that this change won't happen immediately. For names ending '.cam.ac.uk' the MWS has to first gain approval from the relevant administrator. For all names, even once the DNS has been updated, it takes several hours for the change to become visible to all clients.
You probably want to mark the 'official' hostname for the site as that site's 'main hostname'. Any requests handled by this site for hostnames other than the main one will be redirected to a corresponding URL containing the main hostname. This helps to promote one hostname as the 'official' name of the site (see Routing requests to MWS Web Sites).
Once the DNS is updated your old site will become inaccessible, at least under its old name. Before requesting the change you might want to ask email@example.com to add a new alias, e.g. old-www.botolph.cam.ac.uk to the old site so you can still access it if you need to check anything.