Setting Up Webspace

From Support

Jump to: navigation, search

This page is a Tutorial. This is intended to teach how to use a program or service. Improvements are encouraged, but substantial changes should be vetted.

All Netsoc members get world-visible, advertisement-free Webspace.

Creating your www Directory

Login to Matrix via SSH

Run accept_waup.pl - this details the WAUP which you must accept in order to use your webspace. This can take up to 15 minutes to take effect.

Make sure a subdirectory called www exists in your home directory. For this, try running ls -l ~/www/. If it doesn'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/.

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{at}netsoc.tcd.ie, including, if possible, the output of website-working which will help us to figure out what's 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;

nano ~/www/index.html

and type in anything you want; "hello world" is the tradition, but it remains amazing in its banality. 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 644 index.html that file will be readable by apache.

Now open up the same URL in your browser, and you should see `Hello World' in all its glory.

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

You'll have to run chmod on all webpages you create. If you want to make all files in your www directory readable at once run

find $HOME/www -type d -print0 | xargs -r0 chmod 755
find $HOME/www -type f -print0 | xargs -r0 chmod 644

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

Personal tools