Guides

Setting up your Website

How to create your very own website on Matrix
Creating your www Directory

If you have a matrix account, you're automatically the proud posessor of world-visible, advertisement-free web space, for the price of joining Netsoc. To use this fine facility, you need to do a few things (once you've logged in).

Firstly, you have to agree to the Matrix WAUP. To do this, run accept_waup.pl on matrix. This makes you promise not to be naughty with your website. This should have your website enabled in no more than 24 hours. If this doesn't work, mail support@netsoc.tcd.ie.

Make sure a subdirectory called www exists in your home directory. For this, try running ls -l ~/www/. If it dosen't exist (you get the error "No such file or directory,"), create it with mkdir ~/www/. Now make sure it's readable by the web server; run the command chmod 755 ~/www/.

Alternatively, if you have your userspace mapped, create a directory in your home directory called www.

That done, you should be able to look at http://www.netsoc.tcd.ie/~username/ in a browser without any trouble, (where "username" is the user name you have chosen). This is just a file listing, though; not very imaginative.

Should you still have problems email support@netsoc.tcd.ie, including, if possible, the output of ~bbrazil/bin/website-working which will help us to figure out whats going wrong.

Creating the Index Page

Next, you have to create an index page for your www directory; the simplest way of doing this is with a text file. Note that the index file (the one that is displayed when its parent directory is requested) must be named one of index.html, index.php3, index.php, index.cgi, or index.phtml . Open the file using your favourite editor;

pico ~/www/index.html

and type in anything you want; "hello world" is the tradition, but it remains amazing in its banality :-) . Now open up the same URL in your browser, and you should see `Hello World' in all its glory.

Alternatively, if you have your userspace mapped, create the file using notepad or any text editor and save in your www directory.

To produce more interesting output, you will have to use HTML.

After creating this "index.html", again you'll have to set the permissions, so this file is readable by the webserver. So... if you run the command chmod 755 index.html that file will be readable by apache.

You'll have to run chmod 755 on all webpages you create. If you want to make all files in your www directory readable at once run chmod -R 755 $HOME/www/. Be aware that any private files in that directory will now be viewable to anyone, but when you're starting off that shouldn't be an issue.

See Also