Skip to content

Personal WWW home pages (UO students and staff & Oamk staff)


Keywords: , , , , , , , , , , , , ,

Personal home pages could be created in any web server to which one has a user account. In practice the University of Oulu’s students have  user accounts on the Tuomi server and the University and Oamk staff have user accounts on the Koivu server. Both of the servers are Apache web servers and the users have a home directory (5 GB) there. You can create personal web pages in your own home directory. Home pages are a basic service for users, in other words it is free of charge.

The external web pages of the researchers and units (for example faculties, service units and research units), projects and events of the University are created using the Drupal web content management system. The guides which are related to this, are available for the Univeristy staff in Patio intranet.

Notice, that there are a set of rules that you are expected to obey when publishing content on your home pages. For example the commercial and political operation is forbidden. Do not either use pictures under a copyright or other material even if you found them in the Internet. Read more information about the copyrights on the Finnish pages KOPIRAITTILA.

The contents of this instruction:

  1. Web address of home page
  2. Creation of home page and setting of user rights
  3. How do I prevent search robots from indexing my pages?
  4. Limiting the access to pages
  5. FormMail
  6. Counter
  7. Guestbook
  8. Search

1. Web address of home page

Create your home page in a subdirectory public_html in your home directory. You need to give access rights for the subdirectory to make pages visible in internet. When using internet browser, the address of your public_html subdirectory (=home pages) is written in form:

  • student’s home page:
    www.student.oulu.fi/~account/
    where account = student’s user account
  • staff member’s (both the University of Oulu and Oamk) home page:
    cc.oulu.fi/~account/
    where account = staff/researcher’s user account

More information for Oamk staff:

You can transfer the necessary files from your old website (hosted on Oamk’s server) using an SFTP program. First, download them from the `public_html` folder on staff.oamk.fi to your local workstation, and then upload them to Koivu, i.e., the cc.oulu.fi server, into the `public_html` folder.

The old homepage address was:

https://vanha.oamk.fi/~youroldusername

and the new address is:

https://cc.oulu.fi/~yournewusername

For example, if your old Oamk username was:

mattim

and your new login username is:

mmeikalai24

then your old homepage address was:

https://vanha.oamk.fi/~mattim

and the new address is:

https://cc.oulu.fi/~mmeikalai24

Note that the Koivu server available for staff supports only static web pages and files — it does not support PHP or other dynamic functionality.

2. Creation of home page and setting of user rights

You can create home pages in Unix system:

  • Open ssh-connection to server Tuomi (students) or Koivu (staff)
    • In addition, the Lehmus cluster (https://lehmus.oulu.fi) login node lehmus-login1.oulu.fi is available for both staff and students.
  • Create the subdirectory public_html and set user rights: cd ~
    mkdir public_html
    chmod a+x . public_html
  • After that, use pico editor to create a file index.html which wll be your home page:
    cd ~/public_html
    nano index.html
  • Give reading rights for everyone (other) to your web files in subdirectory:
    cd ~/public_html
    chmod a+r *
  • If you create more subdirectories in public_html, then give execution rights for everyone (other) to new subdirectories and reading rights to all files in those directories.
  • You can update your home pages using samba (drive K:) in Windows workstation.

3. How do I prevent search robots from indexing my pages?

You can easily get your page protected from search robots by adding a hide in the head section of the pages you want:
META NAME=”ROBOTS” CONTENT=”NOINDEX, NOFOLLOW”

However, not all search robots follow this universal standard and they index the pages anyway, however, some of them may respect your privacy with this definition.

4. Limiting the access to pages

You can set a username and password for individual pages, or restrict the views of pages to everybody.

  • The restriction on using web pages is based on a .htaccess file that can be made into every html directory. The .htaccess file only affects the directory it is in.
  • An example:
    AuthName TomiTesti
    AuthType Basic
    AuthUserFile /home/otol/tomilepp/.htpasswd
    AuthGroupFile /dev/null
    require valid-user
  • The .htpasswd file has each user’s password cryptated. Most easily, it is done with htpasswd program. The password file must not be put in public_html, or any other directory accessible with the web browser.
  • An example how to create .htpasswd file:
    htpasswd -c /home/otol/tomilepp/.htpasswd tunnus
  • Both files .htaccess and .htpasswd must include the read rights for all:
    chmod a+r .htaccess .htpasswd
  • The limiting according to ip addresses is successful with the following .htaccess file:
    order deny,allow
    deny from all
    allow from .oulu.fi

5. FormMail

The www server has a universal script with which information from the web form on your website can be sent as an email to one or more recipients.

Way 1: The email address of the recipient is not visible on the web page:

Example:

Example of creating an account for FormMail.

In this example, two accounts have been created, the first for one recipient and the second for two recipients.

  • Use the “encrypted” account without the email address.

Example:

<html>
<head>
<title>Testilomake</title>
</head>
<body>
<form method="post" action="http://www.oulu.fi/cgi-bin/FormMail.pl">
<input type="hidden" name="recipient" value="66f159c9e73e4246d128d8e1652336fcxx">
Nimi: <input type="text" name="Nimi"><br>
Puhelin: <input type="text" name="Puh"><br>
<input type="submit" value="Lähetä">
</form>
</body>
</html>

Way 2: The email address is visible on the web page

You can access the form when you indicate the reception address keskitetyt (at) oulu.fi to add your address to the whitelist. This is not the preferred method, since “späm robots” find your address and use it to spam.

Example:

<html>
<head>
<title>Testilomake</title>
</head>
<body>
<form method="post" action="http://www.oulu.fi/cgi-bin/FormMail.pl">
<input type=hidden name="recipient" value="etunimi.sukunimi@oulu.fi">
Nimi: <input type="text" name="Nimi"><br>
Puhelin: <input type="text" name="Puh"><br>
<input type="submit" value="Lähetä">
</form>
</body>
</html>

Sending the information as encrypted

If you want to send data encrypted from the web browser to the server, you can use the ACTION line:

<form method=”post” action=”/th/perl/formmail/FormMail.pl”>

6. Counter

You can use a visitor counter on the page using a tag:

<img src=”/cgi-bin/Count.cgi?df=omatunnus.dat”>

7. Guestbook

First create the guestbook and then create the page for the guestbook.

a) guestbook on student’s homepage ( ‘tunnus‘ is your user account):

ssh nfstu
cd /netservices/www/guestbooks
touch tunnus
chmod a+rw tunnus
cp tomilepp.html tunnus.html
chmod a+r tunnus.html

b) guestbook on staff’s homepage( ‘tunnus‘ is your user account):

cd /netservices/www/guestbooks
touch tunnus
chmod a+rw tunnus
cp tomilepp.html tunnus.html
chmod a+r tunnus.html
  • Next you can edit the file tunnus.html: pico tunnus.html
  • After that, create the page for the guestbook, for example guestbook.html could be like this:

<html>
<head>
<title>users’s guestbok</title>
</head>
<body>

<p>
You can just view guestbook, or you can add your entry to it.</p>

<form action=”/cgi-bin/guestbook/guestbook.cgi” method=post>
<input type=”hidden” name=”file” value=”tunnus”>
<input type=”submit” value=”View guestbook”>
</form>

<hr>
<form action=”/cgi-bin/guestbook/guestbook.cgi” method=post>
<input type=”hidden” name=”file” value=”tunnus”>
<input type=”hidden” name=”mode” value=”add”>
Name:<br>
<input type=text name=”name-required”><br>
Email:<br>
<input type=text name=”email”><br>
Homepage:<br>
<input type=text name=”homepage URL”><br>
Comments:
<br><textarea rows=6 cols=60 name=”comments-multi”></textarea><br>
<input type=”submit” value=”Add entry”>
</form>
<hr>
</body>
</html>

8. Search

The search feature can be added to the pages in the following way:

<form method=”post” action=”http://www.oulu.fi/cgi-bin/htsearch“>
<input type=hidden name=config value=htdig>
<input type=hidden name=restrict value=”oman_sivusi_osoite”>
Search for: <input type=”text” size=”30″ name=”words”>
<input type=”submit” value=”Search”> </form>

  • Change to the point of restrict the url in which you want to limit the search.
  • Htdig search engine index the pages once a week (during the night between Sunday and Monday), so the new pages don’t appear in the search at once.
  • Please see an example of  the search.

« Back

This article was published in categories English version available, All instructions, Oamk , for Oamk staff, for the University of Oulu staff, for the University of Oulu students, accessible content, UniOulu and tags , , , , , , , , , , , , , . Add the permalink to your favourites.