ARCHIVED: Migrate your IU Web Framework site to Sitehost

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

On this page:


Overview

Follow the steps outlined below to migrate your IU Web Framework site from Webserve to the Sitehost service.

Note:
The process of migrating an IU Web Framework website requires technical knowledge and familiarity with IU's WCMS, so be sure to work with your unit's web development or IT staff. If your unit does not have web development or IT expertise, contact Tier 2.

The following is not intended for IU Web Framework sites that have been customized, integrated with applications outside the WCMS, protected with custom .htaccess files, or had scheduled tasks (cron jobs) set up. To determine if your site has been customized and to migrate a site with customizations, see ARCHIVED: Migrate your customized IU Web Framework site to Sitehost.

If your site doesn't use the IU Web Framework, follow the ARCHIVED: Sitehost migration guide instead.

1. Create a new Sitehost account

Note:
You must be the owner or proxy of a group account to request Sitehost for it.

Verify that Two-Step Login (Duo) is enabled for the group account for which you want to request Sitehost; see Use Two-Step Login (Duo) with a group account.

  1. Go to Enterprise Web Technical Services and click Manage your Sitehost account.

    If prompted, log in with your IU username and passphrase.

  2. You will see a list of group accounts that you own. Click Request Sitehost account.
  3. Read the User Agreement, provide the information requested at the end, and then click Request. The request will be sent to Web Services Support for approval. You will receive email confirmation that the account was created.

2. Update Webserve paths in code chunks

A code chunk is used by an IU Web Framework site to output code such as PHP, JavaScript, or HTML.

If any of your site's code chunks contain hard-coded paths to other files on Webserve, you'll need to update these code chunks to reflect the new file paths used by Sitehost. Replace <account> with your group account name when performing the steps below:

  • Replace /ip/<account>/www and /ip/<account>/wwws with /groups/<account>/web
  • Replace /ip/<account>/ with /groups/<account>/
  • Replace www and wwws with web

If you have a MachForm installation on your Webserve account, see MachForm migration instructions on GitHub.

3. Update code managed in the WCMS

In the _php folder, edit the .htaccess file and delete the Satisfy Any and Allow from all directives, as they are not used in Apache 2.4.

4. Update Transports

Each of your site's Transports must be updated using the WCMS Manager Tools to reflect new Transport names, host names, and server directories.

Note:
You must have manager access to a WCMS site to update its Transports.
  1. Log into the WCMS Manager Tools.
  2. Go to Manage Sites > Manage Transports.
  3. Expand the accordion for the site you are migrating to show its Transports.
  4. Click the pencil icon on the upper right of a Transport to edit it using the steps below:

    For the Transport labeled "TEST":

    1. Set "Transport Name" to Sitehost – Test.
    2. Set "Host Name" to ssh.sitehost-test.iu.edu.
    3. Set "Server Directory" to /groups/<account>/.

    For the Transport labeled "LIVE" or "PRODUCTION":

    1. Set "Transport Name" to Sitehost – Production.
    2. Set "Host Name" to ssh.sitehost.iu.edu.
    3. Set "Server Directory" to /groups/<account>/.
    4. Click Submit to save your changes.

5. Update Destinations

Each of your site's Destinations must be updated in the WCMS to reflect the new directory paths in Sitehost. You should update current Destinations. Creating new Destinations will require updating Content Types. Update each Content Type by adding any new Destinations to the Content Type's Publishable Options.

Note:
You must have manager access to a WCMS site to update its Destinations.
  1. Log into your site in the WCMS.
  2. Go to Manage Site.
  3. Click Destinations in the left sidebar.

    For the Destination labeled "TEST":

    1. Right-click the Destination and click Edit.
    2. Set "Directory" to web.
    3. Click Submit to save your changes.
    4. Right-click the Destination and click Rename.
    5. Set "New Destination Name" to Sitehost - Test.
    6. Click Submit to save your changes.

    For the Destination labeled "LIVE" or "PRODUCTION":

    1. Right-click the Destination and click Edit.
    2. Set "Directory" to web.
    3. Click Submit to save your changes.
    4. Right-click the Destination and click Rename.
    5. Set "New Destination Name" to Sitehost - Production.
    6. Click Submit to save your changes.

6. Update the Settings block

You'll need to update the staging URL in your site's Settings block in the WCMS. The Settings block is located toward the bottom of your site's root folder.

  1. Log into your site in the WCMS if you're not already logged in.
  2. Go to Site Content.
  3. Right-click the Settings block in the left-hand file explorer and click Edit.
  4. Set "Staging URL" to <account>.sitehost-test.iu.edu.
  5. Click Submit to save your changes.

7. Run the IU Web Framework setup script on Sitehost-test and Sitehost

The IU Web Framework setup script prepares your Sitehost-test and Sitehost account to serve your IU Web Framework website. Follow the directions below to run the setup script.

Note:
If you're not familiar with SSH or the command line, you can request to have the setup script run for you by contacting Web Services Support.

For your test Sitehost account:

  1. Log into IU's VPN if you're off campus.
  2. SSH into your site using the command line or a tool like PuTTY, replacing <username> with your personal IU username (not the group account name): ssh <username>@ssh.sitehost-test.iu.edu.
  3. Enter your personal passphrase (not the passphrase for the group account).
  4. Confirm your attempt to log in with Duo.
  5. Run the following command, replacing <account> with the group account name: become <account>.
  6. Enter your IU passphrase when prompted.
  7. cd into the web directory.
  8. Run the following command: /groups/iuframe/bin/setup_framework.
  9. When prompted, enter your test site's virtual host URL, replacing <account> with the group account name: <account>.sitehost-test.iu.edu.
  10. Run the following command to list all files and directories: ls -a.
  11. Verify the setup script created the following files and directories:
    1. gwassets/
    2. .htaccess
    3. .user.ini
    4. robots.txt

For your production Sitehost account, follow the steps above, replacing instances of sitehost-test in URLs with sitehost. In step 9, replace the URL <account>.sitehost-test.iu.edu with your virtual URL (for example, iuframe.iu.edu). If your site does not have a virtual host, enter the following URL, replacing <account> with the group account name: <account>.sitehost.iu.edu.

8. Publish your site to Sitehost's test server and verify it works

Publish your site to Sitehost's test server to confirm your site is working as expected before publishing to Sitehost's public-facing production server.

  1. Log into your site in the WCMS if you're not already logged in.
  2. Go to Site Content.
  3. Right-click the root folder of your site in the left-hand file explorer and click Publish.
  4. Check the box labeled "Sitehost - Test".
  5. Uncheck the box labeled "Sitehost - Production".
  6. Click Publish.
  7. Visit <account>.sitehost-test.iu.edu to verify your site is working as expected. Contact Web Services Support if you're unable to get your site to work on Sitehost's test server.

9. Publish your site to Sitehost's production server and verify it works

To publish your site to Sitehost's production server, follow the steps below:

  1. Log into your site in the WCMS if you're not already logged in.
  2. Go to Site Content.
  3. Right click on the root folder of your site and click Publish.
  4. Uncheck the box labeled "Sitehost - Test".
  5. Check the box labeled "Sitehost - Production".
  6. Click Publish.

Testing your site on the Sitehost production server requires adding your virtual host to Sitehost without requesting a DNS change. If you are not using a virtual host, then you can view your site on Sitehost by going to <account>.sitehost.iu.edu.

Make a virtual host request

Note:
Only a group account's owner or proxy can request a virtual host for it.
  1. Go to Enterprise Web Technical Services and click Manage your Sitehost account.

    If prompted, log in with your IU username and passphrase.

  2. After logging in, you will see a list of group accounts you own. Click Account details for the group account for which you want to request a virtual host.
  3. Click Virtual Hosts on the left menu.
  4. Click Request a new Virtual Host on Sitehost.
  5. Complete the form. Check the box labeled "This currently points to another server" if your virtual host is currently pointing to another server such as Webserve. If you check this box, the DNS change will not take place until you contact Web Services Support to request a virtual host DNS transfer.
  6. Click Request.

You will receive a confirmation email when your virtual host request is approved. Allow up to 30 minutes from receiving the confirmation email for the virtual host to be installed on Sitehost.

Visit your site using a test URL

  1. In a web browser, go to https://<website_url>/sitehostmigrationtest, replacing <website_url> with your site's virtual host URL (for example, iuframe.iu.edu).
  2. You will see an intermediate page that says you are about to view your site on the Sitehost production server. Click the virtual host link to proceed.

You will now see your site as rendered by the Sitehost servers. The site title will begin with "Testing - ". Repeat the two steps listed above if clicking the link on the intermediate page does not take you to your site as rendered by the Sitehost servers.

10. Request a virtual host transfer

When you have finished the above steps:

  1. Log into Enterprise Web Technical Services with your personal IU username and passphrase.
  2. Click Manage your Sitehost account.
  3. Find the account associated with the virtual host, and then click the link for the virtual host.
  4. At the bottom, click Request DNS changes.

Also, you may contact Tier 2 to send the account names and site URLs that you migrated.

Site migrations require a DNS change, which will take effect by 8am on the following business day after you receive confirmation of the request.

When the DNS changes take effect, Webserve administrators will lock your Webserve account. If you need your account unlocked, contact Tier 2.

This is document ayxs in the Knowledge Base.
Last modified on 2023-05-08 15:54:21.