Webspace

From Redbrick Wiki
Revision as of 01:25, 16 December 2006 by Undone (talk | contribs) (→‎Setup Code)

Webspace Setup on Redbrick

This is an introduction to HTML tutorial.It is a simple guide to getting awebpage up and running on Redbrick.


Location

Redbrick sites for each user are located at http://www.redbrick.dcu.ie/~username.

The webserver automatically looks for the public_html folder in that person's home directory. It then looks for the index.html file in that folder. If it can't find either of them it will return an error.


Permissions

It is important to make sure that the webpages have the correct permissions, or they won't be visible to others. File permissions determine who can access your file. Your public_html folder needs to be readable, writable and executable to yourself and executable to everyone else. The files in your public_html need to be readable and writable to yourself but only readable to everyone else.

You can change file permissions using the chmod command. The following commands will set the correct permissions for your public_html folder and index.html:

chmod 711 public_html
chmod 644 public_html/index.html

You can also change file permissions through WinSCP. Open WinSCP and login, then simply right click the files and go to Properties, where you can choose the file permissions by clicking. Download WinSCP


Setup Code

Once that is okay, all you have to concentrate on is your index.html and the other pages you wish to put on the web. Here's some html code to get your feet off the ground. Just type nano ~/public_html/index.html and insert the following code:

<html>
<head> 
<title> Title of page </title> 
</head>
<body> The actual webpage goes in here </body>
</html>

The <head> and </head> tags tell the Web browser where the HTML in your document starts and finishes. After the <html> is where all the document's information should go. Between <title> and </title> is where the title of your page should go. This appears in the bar at the top of the browser. After these come the <body> and </body> tags. This is where you put the information you want displayed on the actual webpage itself.

It is important to make sure to close all the tags in the right order. If you open a head tag and then a title tag, you have to close the title tag first, then the head one. You can also write your web pages elsewhere (for example, on your desktop) and then transfer them to your webspace via WinSCP.


This is just a basic introduction to get you on your feet. There are loads of sites with further details. If you need a hand, feel free to get in contact with a member of helpdesk.

Links

WinSCP - you can download WinSCP from this link.