Create your own website - Kunnskapsbasen
Create your own website
Students and employees can create their own websites at folk.ntnu.no. This article will contain some tips and guidelines to get started as well as how to publish your website.
- How to create a website
- Your website: folder for uploading
- Setting permissions
- Visit statistics for your website
- Known problems
Norsk versjon: Lag din egen nettside
Looking for something else? Topic page about IT services | Pages labeled with web
How to create a website
A guide for creating websites can be found here W3Schools. They will show step-by-step how you can use HTML to easily create your own homepage, as well as give you more advanced guides for PHP etc.
Your website: folder for uploading
To make your files available under folk.ntnu.no/<username> (your NTNU username) you need to place them in the webedit network directory. There are several ways to reach the webedit network resource detailed below.Please note that anything you upload here will be available for anyone unless otherwise specified with other permissions. Make sure you do not upload anything sensitive that could possibly be available to others.
Connect to network directory normally
This is the simplest method and is done by connecting to webedit the same way you connect to other NTNU network directories. Consult the following links for connecting, choosing the link that corresponds to your operating system. The address you are connecting to is: webedit.ntnu.no/username (your NTNU username).
- Connecting to a network directory in Windows
- Connecting to a network directory on Mac OS X
- Connecting to a network directory in Unix/Linux
Using Q:\-drive on a campus computer
If you find yourself at an NTNU computer lab the webedit directory should already be connected. Open My Computer and double-click drive Q:\
It is also possible to reach the directory by using SFTP or SCP. To do so connect to one of the login servers as described in this article on secure FTP. Files which are to be published on the web are placed in the folder /web/folk/<username>.
Everything you place in webedit (Q: drive) will appear at the web address folk.ntnu.no/<username>.
Under folk.ntnu.no the files only have to be readable for you because the webserver runs as your user. One exception is .htaccess. This file has to be readable for others because the webserver reads the file before switching user.
Under org.ntnu.no the files have to readable for the group because the webserver runs as the current group. Except .htaccess, which has to be readable for others.
Permissions can be set in Unix (ex. via SSH).
Setting permissions in Unix
The command to set file permissions is "chmod"
For example: chmod 755 <file name>
This is the most common command for setting web file permissions. The first number sets your permissions, the second sets group permissions which you are a member of (normally your faculty) and the last number is for everyone.
Permissions you can set are typically read(r), write(w), and execute(x). The table for numbers and permissions is below:
0 - - - 1 - - x 2 - w - 3 - w x 4 r - - 5 r - x 6 r w - 7 r w x
NOTE: Remember that both folders and files permissions must be set, in addition folders need to have the execute permission for people to open them.
When you have put files into your web folder and made them readable for everyone, the web address folk.ntnu.no/<username> will simply be a list of the files that you have placed there.
If you would rather that a home page shows you need to create an HTML file which you name index.html. This file must be placed in webedit (Q: drive). When this is done index.html will then open whenever anyone visits your folk.ntnu.no address instead of just a file list.
If you wish to learn how to create HTML files please see the guides at w3schools.
Visit statistics for your website
Hit statistics are currently not available.
Here are some typical causes for your website not working.
If you have set the wrong permissions for your site it will typically not work. Note that you can have set the permissions wrong on either your folders where your files are contained, the files themselves, or both.
/web/folk/brukernavn/ cannot be found
The website is actually located under /web/folk/<username>/. Now and again it has happened that an error occurred when a user was made and this network directory was not created. If nothing above has helped please contact Orakeltjenesten so they can make sure the network directory exists. If the error message says brukernavn it is because that is the norwegian word for username.
- Password protect parts of your website (Norwegian)
- Create a website (for employees)
- Learn HTML (English)
- File Permissions
Students: Orakeltjenesten. Orakeltjenesten does not assist students with webdesign, just connecting to the webstorage and setting permissions.
Employees: Local IT support.