Creating Webpages at JCU
You want to make a web page? Before starting there are a few things you need to consider:
-
What information do you want to put across?
-
What design will your homepage have?
-
Do you want lots of graphics? Or do you want your page to download quickly?
-
Will your page link to other pages?
Your own personal web page will be stored in the public_html folder in your computer account space in your home drive.
The default account space on the central UNIX server is 10Mb for Undergraduates, postgraduates and staff.
It's possible to use almost any word processor to create web pages, or a simple text editor like Notepad & TextEdit (these come with Windows and Mac OSX) or pico (UNIX text editor) or you may have access to specialist software for creating web pages like Dreamweaver.
This How To...? Guide is primarily designed for use by students using the General Access and Teaching Computer Facilities (GATCF).
Creating/authoring a home page
Designate a homepage
A home page is the one that a user will see if they use a URL (web address) without a filename. If you go to http://www.jcu.edu.au/ you will go to the university's homepage.
The most common homepage filename is index.html so when you go to the university's homepage, you will go to www.jcu.edu.au/index.html
You can create your homepage (ie index.html) file in a number of ways, the preferred method would be to use a WYSIWYG HTML editor which makes it easy to edit and create webpages. Alternatively you can use any text editor if you are comfortable with working in HTML code.
Text (pico) Editor
-
Log in to email.jcu.edu.au using Putty (if you are in the GATCF) which should open at a command line prompt (if you are presented with a menu then choose option 13).
-
Type in ls -l (to list files and folders) and press the Enter key. Make sure you have a public_html/ directory (if you haven't type in mkdir public_html to make a directory and press enter).
-
Type in cd public_html to change directory and press the Enter key.
-
To create a file type in pico index.html - the pico editor will open and you can start typing away in raw HTML in your UNIX account space. See below for some information on HTML tags.
-
When you have finished, press Ctrl-X to save the index.html
-
Your file is in the right place now you just need to check the file permissions to make sure that the rest of the world can view them!
HTML Tags
HTML (Hypertext Markup Language) is the common language of the World Wide Web.
HTML files are basically text (ASCII) files that can be read by any computer. HTML files have special tags that can be interpreted by a web browser, such as Netscape so that you can view a nicely formatted file.
HTML tags are commands enclosed between angle brackets < >. Opening and closing versions occur for many tags and they have the same command word between the angle brackets BUT the closing tag carries an additional forward slash symbol (/).
For example <command>some text</command>
The basic tags are:
<html>starts your page
<h1>puts a big heading in</h1>
<hr>inserts a horizontal line</hr>
<body>this is where the page content goes
<b>bold text</b>
<i>text in italics</i>
<u>underlined text</u>
<center>centred</center>
<p>starts a new paragraph
<br /> is used for line breaks
<b><i><u>bold, italicised, underlined text</b></i></u>
</body>ends the text
</html>ends your page
your basic web page is complete!
For more info on HTML please refer to some of the following useful pages:
W3Schools Online Web Tutorials
Putting them on the server for all to see
So that others can see your web pages, make sure that the web page files are in the public_html directory in your Home Directory.
File names must not contain spaces.
Web page filenames are case sensitive - on the web, Infohelp.doc and infoHelp.doc are two different files.
Once the files are in place you need to change the file permissions to allow the rest of the world to view them.
Using FTP
If you have created the files and saved them to disk at home on your computer hard drive you can use FTP (file transfer protocol) to get them to your computer account.
The easiest way is to use Internet Explorer.
-
You need to type in the following location:
ftp://accountcode@homes.jcu.edu.au/
(Your account code, also known as user name and login, takes the form of jc654321 or fac-abc ) -
You will be asked to enter your password - use the one that you'd use for e-mail you will then have access, via your web browser, to your Home Drive on the central server.
-
Click on your public_html folder - you will be taken, via the web browser, to your public_html folder
-
Now just copy and paste the files you wish to upload over to your public_html folder.
-
All that is left is to check the permissions on the file(s).
File Permissions
To check if your web pages already have the correct permissions, type http://www.jcu.edu.au/~account_code/filename.html in the location bar of your browser. If your web page cannot be viewed, check the filename and case. If the pages still cannot be viewed you'll need to change the permissions on the files.
In the GATCF, this part can be done using an application called PuTTY to access a command line in UNIX (email).
Go to Start > All Programs > PuTTY and select the Putty application from the available list to launch the program.
In the configuration window, under Host Name type email.jcu.edu.au and select the protocol SSH, then click the Open button. Select “Yes” at the security alert prompt. This will launch a connection to the JCU homes drive space. At the prompt enter your JCU username and password which should open a command line prompt.
Tip: If you are presented with a menu rather than a command line prompt then choose option 13.
On the server, each file has three sets of permissions:
-
Owner permissions
-
Group permissions
-
Rest of the world permissions
Each category has 3 levels of permission:
-
Read permission, where the file can only be read (4 points or r)
-
Write permission where the file can be written to or modified (2 points or w)
-
Execute permission where the file can be executed or run (1 point or x)
On the central server your public_html folder should have permissions of 755 or:
Owner: Read, Write and Execute - 4+2+1 = 7
Group: Read and Execute - 4+1 = 5
Rest of the World: Read and Execute - 4+1 = 5
The files within should have permissions of 644 or:
Owner: Read and Write - 4+2 = 6
Group: Read - 4
Rest of the World: Read - 4
To change permissions use the command chmod:
-
Type ls -l to see the contents of your JCU homes space.
-
To change the permissions of the public_html folder type in chmod 755 public_html and press the Enter key.
-
To open the public_html directory type in cd public_html and press the Enter key.
-
Type ls -l to list all the files in the public_html folder.
-
Change the permissions on your HTML and associated files by typing in chmod 644 filename and press the Enter key.
Tip: To change every file in the folder at once type chmod 644 *.* and press Enter. Also typing cd .. will navigate up one level or folder.
-
Type exit to close the PuTTY client and cancel your connection to the homes drive.
When you use FTP software like CuteFTP (Windows), Cyberduck (OSX) or FileZilla (Windows and OSX) you can change the permissions of files when you move them.
To View the End Result
In the location bar of your browser type in: http://www.jcu.edu.au/~accountcode/
If all is okay, you should be able to view your home page!