Publish a web page at IU using Pages

UITS provides Pages for serving individual web pages. Anyone with an IU username and passphrase may create an individual web page on Mercury and publish it using Pages.

For policies regarding posting information on Pages, see About IU's policy on information on personal web pages.

On this page:


About Mercury/Pages accounts

The Pages service at Indiana University is for professional, research, instructional, and academic web pages only. You should not use Pages to share hobbies, family information, and favorite entertainment links or other purely personal content. If you will be using your web pages for official IU business related to your organizational unit, approved professional organization, or registered student group, then you should request an account on Webserve. Accounts on Webserve have access to subservices and web utilities not available through Pages. To determine which account is best for you, see the Pages and Webserve sections of Web pages and central hosting at IU.

The web pages for the Pages service are hosted on Mercury. On Mercury, your Pages files are located in your ~/www directory and its subdirectories.

If you have IU computing accounts but not a Mercury account, you can create one using the instructions in Get additional IU computing accounts. Your account should be available within an hour after you create it, and will have a storage space of 1 GB.

Create your individual home page

Choose a tool for creating and editing HTML files

You have the following options for creating and editing your HTML files:

  • Use an SSH2 client to open a terminal session on Mercury, and then use one of the installed text editors (Emacs, Nano, or vi) to create and edit your HTML files, and save them in your ~/www directory. When connecting via SSH, use the server name mercury.uits.indiana.edu, and your IU username and passphrase.
    Note:
    When connecting to mercury.uits.indiana.edu from outside the IU network, use VPN.
  • Use a text editor or word processor on your computer to create and edit your HTML files, and then upload them to your ~/www directory on Mercury using an SFTP client (see Upload your files below).
    Note:
    If you use a word processing program, make sure to save the file you create as a plain text file (or as HTML text, if that option is available) rather than the default word processing file format.
  • Use an application specifically designed for creating and editing web pages, such as Adobe Dreamweaver, and then upload your files to your ~/www directory on Mercury using an SFTP client (see Upload your files below).
    Note:
    You can use your HTML editor to upload your files to Mercury only if the program supports secure file transfer. For help, consult the software's documentation.

Name your home page

For your page to be listed in the Directory of Personal Home Pages, your home page must be named home.html. If you don't want your page listed in the directory, choose one of the following alternative filenames for your home page:

home.htm
home.shtml
index.html
index.htm
index.shtml

If you do not use any of these filenames, the URL http://pages.iu.edu/~username (where username is your username) will return an error.

Manage your files on Mercury

Upload your files

Once you've created your web pages, you need to make sure they're in the proper place in your Mercury account. If you used a text editor on Mercury from within your ~/www directory, your files are already in the right place.

If you used created your web page on your personal computer or on an STC workstation, you will need to upload the file to Mercury using an SFTP client; for instructions, see Use a graphical SFTP client to transfer files to and from your IU Pages account on Mercury.

To work with your Pages files and directories from the command line on Mercury, use an SSH2 client (for example, PuTTY in Windows or the Terminal in macOS) to open a terminal session on Mercury. When connecting via SSH, use the server name mercury.uits.indiana.edu, and your IU username and passphrase.

Note:
When connecting to mercury.uits.indiana.edu from outside the IU network, use VPN.

Because Mercury runs on a Unix-like operating system (Red Hat Enterprise Linux), you should be familiar with some basic commands. In particular, note the following commonly used commands:

  • Change directories: When you SSH to Mercury, you most likely will land in your home directory (~/). Use the cd command to navigate between directories:
    • To change from your home directory to your ~/www directory (where you Pages files are stored), on the command line, enter cd www.
    • To change from your ~/www directory to one of its subdirectories (if one exists), enter cd my_directory (replace my_directory with the name of your subdirectory).
    • To move back one level, from your subdirectory, to your ~/www directory, enter cd ...
    • To return to your home directory (~/) from any directory or subdirectory, enter cd.
  • List files: Use the ls command to view the contents of a directory:
    • To list non-system files and directories stored in the current directory, on the command line, enter ls.
    • To include system/configuration files (dot files) in the list, enter ls -a.
    • To list all files and directories (including hidden dot files), and their associated metadata, enter ls -al.
    • To list non-system files and directories (and their associated metadata) sorted by modification time (newest first), enter ls -lt.
    Note:
    If your system/configuration (dot) files ever become corrupt or stop working, run the ezreset command; for more, see Use ezreset to reset your accounts to their default settings.
  • Create a new directory: To create a new directory within the current directory, on the command line, enter mkdir my_directory (replace my_directory with the name of your subdirectory). If you have problems viewing files in the new subdirectory in a browser, run spinweb at the command line on Mercury.
  • Set file permissions: The correct file permissions should be set by default so that your pages will be visible to you and to others in a web browser. If you have trouble viewing your pages, on the command line, enter spinweb. This runs a UITS script that ensures the permissions are set correctly on your ~/www directory and any of its subdirectories. For more, see Use spinweb on Mercury/Pages.

    Alternatively, use the chmod command to set file permissions:

    • To set file permissions an HTML file in your current directory, so that its accessible to anyone with the URL, on the command line, enter chmod 755 my_file.html (replace my_file.html with the name of your file).
    • To set file permissions on all files and subdirectories in your ~/www directory, so they are accessible to anyone with the appropriate URLs, enter cd to make sure you're in your home directory, and then enter chmod -R 755 ~/www.
    Note:
    You also can limit access so that only specific IU individuals can view your pages; see Limit access to your files below.

For more, see Introduction to Unix commands.

View your web pages

Once your files are in place and the permissions are set correctly, you can view your web pages in a browser:

  • To view your home page (the home.html file in your ~/www directory), use the following URL (replace username with your IU username):
    http://pages.iu.edu/~username/
    
  • To view another web page stored in the top level of your ~/www directory, add the file name to the end of the URL; for example (replace username with your IU username and my_file.html with the name of your file):
    http://pages.iu.edu/~username/my_file.html
    
  • To view a web page stored in a subdirectory of your ~/www directory, the URL will include the name of that directory; for example (replace username with your IU username, my_subdirectory with the name of the subdirectory, and my_file.html with the name of your file):
    http://pages.iu.edu/~username/my_subdirectory/my_file.html
    

Limit access to your files

To limit access to your web pages so that only specific IU individuals can view them, use .htaccess files in your ~/wwws directory and its subdirectories. Newly created Mercury accounts automatically have a ~/wwws directory. For more, see Control web page access. (The information refers to Webserve, but also applies to Mercury.)

Publicize your individual home page

You have the following options for publicizing your individual home page:

  • If you have a file named home.html or index.html in your ~/www directory on Mercury and have run spinweb after creating it, this page will be listed in IU's Directory of Personal Home Pages (the directory updates twice a day). Once your page is linked from the directory, anyone using the IU Search will be able to find it. For more about using this directory, see Add or remove a link from the IU Directory of Personal Home Pages to a web page.
  • Another option is to create an email signature file that contains the URL for your home page. The signature file will be automatically appended to every email message you send.
  • You may submit your web page's URL to a search engine such as Yahoo! or WebCrawler, but note that some search engines use robots to verify the address. At IU, the Pages server has a robots.txt file that denies access to all robots. Account owners can change their robots.txt search engine crawl settings at Search Engine Crawl Settings for Pages.

Archive and transfer your site

You may want to save your website or some files in your account for your instructor's use, for your own use after you leave IU, or as an additional means of backup. You can use the Unix tar command to save entire directories or collections of files in one archive file that you can send to your personal computer or an STC workstation. You can also use the tar command to compress your archive to a smaller size, making it quicker to transfer. From your personal computer or an STC workstation, you can use IU's Slashtmp service to share that file with someone such as your instructor.

For more, see:

This is document alcr in the Knowledge Base.
Last modified on 2019-02-01 11:10:27.

Contact us

For help or to comment, email the UITS Support Center.