> In Finnish

dot Service Desk for staff
tel  0294 483 124

dot Mobile Phone Support for staff
tel  0294 483 164

dot Help and advice
tel  0294 483 080

IT Administration Services
P.O. BOX 7600
90014 University of Oulu

University of Oulu
STAFF IT SERVICES > PERSONAL HOMEPAGE

How to create your personal homepage

The home page is created in your public_html folder located on the Koivu or Paju server. WWW pages reside on either (Koivu server) cc.oulu.fi or (Paju server) student.oulu.fi

Establish an SSH connection to Koivu or Paju

Create a sub directory called public_html in your home directory and grant everyone the right to execute to your home directory and public_html

cd ~

mkdir public_html

chmod 711 public_html

Next create a file called index.html (i.e. use pico) in your public_html directory this will be your personal homepage

cd ~/public_html

pico index.html

In Unix shells, the ~ indicates the current user's home directory (e.g., /home/username). When prepended to a particular username, it indicates that user's home directory (e.g., ~janedoe for the home directory of user janedoe, typically /home/janedoe).

In URL's, the characters %7E (%7e) may substitute a ~ if an input device lacks a ~ key. Thus, http://www. student.oulu.fi /~johndoe/ and http://www. student.oulu.fi /%7Ejohndoe/ are essentially the same URL.

You can now begin editing your homepage. You can modify this file in order to personalize it. To create a new page, just make a new file called filename.html Make sure that this file is in your public_html directory and that it has the proper permissions set. It should be readable to everyone and writable only to you. To do this, type the following from the unix prompt:

cd ~/public_html

chmod 644 filename.html <- file name being the name of your html file

If you create any sub directories under your public_html directory, permission to execute must be granted to all of these directories and all of the files contained within must have read permissions. You can update the pages with a windows workstation using SSH/SFTP. File and directory permissions must be set as mentioned previously.

Examine your page immediately by launching a browser and going to http://cc.oulu.fi/~username/ or http://www.student.oulu.fi/~username/ the username is your Paju/Koivu user ID.

Your web site will automatically be added to the staff or student homepage list. Create web material with any text editor with HTML basics or export a word processing file as html.

Self help references

Web Developer's Virtual Library
Web reference

Homepage counter

Add this tag to any web page <img src="/cgi-bin/Count.cgi?df=userid.dat">

Insert your user id in place of “user id” in the tag above. If you want to count more than one page, you must make the counter unique from the last one by naming “userid.dat” to “nameofpage_userid.dat”. Always use your user id when adding a counter.

More information: http://www.muquit.com/muquit/software/Count/Count.html

How do I prevent my page from being indexed or searched?

Add this to the heading of the page you don’t want indexed

META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"

not all crawlers comply with this universal standard so your site could be crawled anyway. Usually, the biggest search engines respect your privacy by following this definition.

How do I restrict web page access?

the .htpasswd file contains all the encrypted user passwords. The easiest way to generate this file is with the htpasswd command. Do not place this file in any web accessible folder such as public_html.

generate htpasswd file by typing this command:

htpasswd -c ~/.htpasswd username

Username can be any name that defines the person you want to give web page access

to add more usernames to the file

htpasswd ~/.htpasswd secondusername

set permissions for .htpasswd file

chmod 644 .htpasswd

Restricting access to your webpage is based on the .htaccess file which can be created in any html folder. The .htaccess file only affects the directory in which its located. Example

pwd .htpasswd ( type this command in the same directory where the .htpasswd was created)

unix will return an absolute path for example /home5/ota/wdonnell/.htpasswd

this path is needed by the .htaccess file you are about to create

pico .htaccess

Enter this info: enter the .htpasswd path beside AuthUserFile as seen below

AuthName TomiTesti

AuthType Basic

AuthUserFile /home5/ota/wdonnell/.htpasswd

AuthGroupFile /dev/null

require valid-user

set permissions for .htaccess

chmod 644 .htaccess

Example of an .htaccess file for www.oulu.fi notice the directory paths for .htpasswd differ between koivu and oulu. create the .htaccess file in the directory you want to restrict

AuthName TomiTesti

AuthType Basic

AuthUserFile /netservices/virtual/htaccess/test.htpasswd

AuthGroupFile /dev/null

require valid-user

The .htpasswd file will be created on Koivu in the directory /www2/htaccess but on the www.oulu.fi machine, in the directory /netservices/virtual/htaccess

set passwords on koivu

htpasswd -c /www2/htaccess/test.htpasswd username

Username can be any name that defines the person you want to give web page access

IP address restriction

order deny,allow
deny from all
allow from .oulu.fi